/** * @fileoverview * @enhanceable * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); goog.exportSymbol('proto.CloseSessionInputMessage', null, global); goog.exportSymbol('proto.IdentifySessionMessage', null, global); goog.exportSymbol('proto.NewSessionFailureMessage', null, global); goog.exportSymbol('proto.NewSessionFailureMessage.Reason', null, global); goog.exportSymbol('proto.NewSessionMessage', null, global); goog.exportSymbol('proto.ResizeSessionTTYMessage', null, global); goog.exportSymbol('proto.SessionDoneMessage', null, global); goog.exportSymbol('proto.SessionOutputMessage', null, global); goog.exportSymbol('proto.SessionOutputMessage.FD', null, global); goog.exportSymbol('proto.ShutdownSessionMessage', null, global); goog.exportSymbol('proto.TTYDimensions', null, global); goog.exportSymbol('proto.WriteToSessionMessage', 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.NewSessionMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.NewSessionMessage.repeatedFields_, null); }; goog.inherits(proto.NewSessionMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.NewSessionMessage.displayName = 'proto.NewSessionMessage'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.NewSessionMessage.repeatedFields_ = [3]; 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_, 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.NewSessionMessage.prototype.toObject = function(opt_includeInstance) { return proto.NewSessionMessage.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.NewSessionMessage} msg The msg instance to transform. * @return {!Object} */ proto.NewSessionMessage.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId(), command: msg.getCommand(), argsList: jspb.Message.getField(msg, 3), envMap: (f = msg.getEnvMap(true)) ? f.toArray() : [], cwd: msg.getCwd(), ttyDimensions: (f = msg.getTtyDimensions()) && proto.TTYDimensions.toObject(includeInstance, f), isFork: msg.getIsFork() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.NewSessionMessage} */ proto.NewSessionMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.NewSessionMessage; return proto.NewSessionMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.NewSessionMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.NewSessionMessage} */ proto.NewSessionMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setCommand(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.getArgsList().push(value); msg.setArgsList(msg.getArgsList()); break; case 4: var value = msg.getEnvMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString); }); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setCwd(value); break; case 6: var value = new proto.TTYDimensions; reader.readMessage(value,proto.TTYDimensions.deserializeBinaryFromReader); msg.setTtyDimensions(value); break; case 7: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsFork(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.NewSessionMessage} message * @param {!jspb.BinaryWriter} writer */ proto.NewSessionMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.NewSessionMessage.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.NewSessionMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = this.getCommand(); if (f.length > 0) { writer.writeString( 2, f ); } f = this.getArgsList(); if (f.length > 0) { writer.writeRepeatedString( 3, f ); } f = this.getEnvMap(true); if (f && f.getLength() > 0) { f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } f = this.getCwd(); if (f.length > 0) { writer.writeString( 5, f ); } f = this.getTtyDimensions(); if (f != null) { writer.writeMessage( 6, f, proto.TTYDimensions.serializeBinaryToWriter ); } f = this.getIsFork(); if (f) { writer.writeBool( 7, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.NewSessionMessage} The clone. */ proto.NewSessionMessage.prototype.cloneMessage = function() { return /** @type {!proto.NewSessionMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint64 id = 1; * @return {number} */ proto.NewSessionMessage.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.NewSessionMessage.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string command = 2; * @return {string} */ proto.NewSessionMessage.prototype.getCommand = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.NewSessionMessage.prototype.setCommand = function(value) { jspb.Message.setField(this, 2, value); }; /** * repeated string args = 3; * If you change this array by adding, removing or replacing elements, or if you * replace the array itself, then you must call the setter to update it. * @return {!Array.} */ proto.NewSessionMessage.prototype.getArgsList = function() { return /** @type {!Array.} */ (jspb.Message.getField(this, 3)); }; /** @param {Array.} value */ proto.NewSessionMessage.prototype.setArgsList = function(value) { jspb.Message.setField(this, 3, value || []); }; proto.NewSessionMessage.prototype.clearArgsList = function() { jspb.Message.setField(this, 3, []); }; /** * map env = 4; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map} */ proto.NewSessionMessage.prototype.getEnvMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map} */ ( jspb.Message.getMapField(this, 4, opt_noLazyCreate, null)); }; /** * optional string cwd = 5; * @return {string} */ proto.NewSessionMessage.prototype.getCwd = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 5, "")); }; /** @param {string} value */ proto.NewSessionMessage.prototype.setCwd = function(value) { jspb.Message.setField(this, 5, value); }; /** * optional TTYDimensions tty_dimensions = 6; * @return {proto.TTYDimensions} */ proto.NewSessionMessage.prototype.getTtyDimensions = function() { return /** @type{proto.TTYDimensions} */ ( jspb.Message.getWrapperField(this, proto.TTYDimensions, 6)); }; /** @param {proto.TTYDimensions|undefined} value */ proto.NewSessionMessage.prototype.setTtyDimensions = function(value) { jspb.Message.setWrapperField(this, 6, value); }; proto.NewSessionMessage.prototype.clearTtyDimensions = function() { this.setTtyDimensions(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.NewSessionMessage.prototype.hasTtyDimensions = function() { return jspb.Message.getField(this, 6) != null; }; /** * optional bool is_fork = 7; * 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.NewSessionMessage.prototype.getIsFork = function() { return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 7, false)); }; /** @param {boolean} value */ proto.NewSessionMessage.prototype.setIsFork = function(value) { jspb.Message.setField(this, 7, 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.NewSessionFailureMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.NewSessionFailureMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.NewSessionFailureMessage.displayName = 'proto.NewSessionFailureMessage'; } 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_, 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.NewSessionFailureMessage.prototype.toObject = function(opt_includeInstance) { return proto.NewSessionFailureMessage.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.NewSessionFailureMessage} msg The msg instance to transform. * @return {!Object} */ proto.NewSessionFailureMessage.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId(), reason: msg.getReason(), message: msg.getMessage() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.NewSessionFailureMessage} */ proto.NewSessionFailureMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.NewSessionFailureMessage; return proto.NewSessionFailureMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.NewSessionFailureMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.NewSessionFailureMessage} */ proto.NewSessionFailureMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(value); break; case 2: var value = /** @type {!proto.NewSessionFailureMessage.Reason} */ (reader.readEnum()); msg.setReason(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setMessage(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.NewSessionFailureMessage} message * @param {!jspb.BinaryWriter} writer */ proto.NewSessionFailureMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.NewSessionFailureMessage.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.NewSessionFailureMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = this.getReason(); if (f !== 0.0) { writer.writeEnum( 2, f ); } f = this.getMessage(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.NewSessionFailureMessage} The clone. */ proto.NewSessionFailureMessage.prototype.cloneMessage = function() { return /** @type {!proto.NewSessionFailureMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint64 id = 1; * @return {number} */ proto.NewSessionFailureMessage.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.NewSessionFailureMessage.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional Reason reason = 2; * @return {!proto.NewSessionFailureMessage.Reason} */ proto.NewSessionFailureMessage.prototype.getReason = function() { return /** @type {!proto.NewSessionFailureMessage.Reason} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {!proto.NewSessionFailureMessage.Reason} value */ proto.NewSessionFailureMessage.prototype.setReason = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional string message = 3; * @return {string} */ proto.NewSessionFailureMessage.prototype.getMessage = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** @param {string} value */ proto.NewSessionFailureMessage.prototype.setMessage = function(value) { jspb.Message.setField(this, 3, value); }; /** * @enum {number} */ proto.NewSessionFailureMessage.Reason = { PROHIBITED: 0, RESOURCESHORTAGE: 1 }; /** * 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.SessionDoneMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.SessionDoneMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.SessionDoneMessage.displayName = 'proto.SessionDoneMessage'; } 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_, 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.SessionDoneMessage.prototype.toObject = function(opt_includeInstance) { return proto.SessionDoneMessage.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.SessionDoneMessage} msg The msg instance to transform. * @return {!Object} */ proto.SessionDoneMessage.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId(), exitStatus: msg.getExitStatus() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.SessionDoneMessage} */ proto.SessionDoneMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.SessionDoneMessage; return proto.SessionDoneMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.SessionDoneMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.SessionDoneMessage} */ proto.SessionDoneMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(value); break; case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setExitStatus(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.SessionDoneMessage} message * @param {!jspb.BinaryWriter} writer */ proto.SessionDoneMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.SessionDoneMessage.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.SessionDoneMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = this.getExitStatus(); if (f !== 0) { writer.writeInt64( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.SessionDoneMessage} The clone. */ proto.SessionDoneMessage.prototype.cloneMessage = function() { return /** @type {!proto.SessionDoneMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint64 id = 1; * @return {number} */ proto.SessionDoneMessage.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.SessionDoneMessage.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional int64 exit_status = 2; * @return {number} */ proto.SessionDoneMessage.prototype.getExitStatus = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.SessionDoneMessage.prototype.setExitStatus = function(value) { jspb.Message.setField(this, 2, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.IdentifySessionMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.IdentifySessionMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.IdentifySessionMessage.displayName = 'proto.IdentifySessionMessage'; } 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_, 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.IdentifySessionMessage.prototype.toObject = function(opt_includeInstance) { return proto.IdentifySessionMessage.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.IdentifySessionMessage} msg The msg instance to transform. * @return {!Object} */ proto.IdentifySessionMessage.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId(), pid: msg.getPid() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.IdentifySessionMessage} */ proto.IdentifySessionMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.IdentifySessionMessage; return proto.IdentifySessionMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.IdentifySessionMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.IdentifySessionMessage} */ proto.IdentifySessionMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setPid(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.IdentifySessionMessage} message * @param {!jspb.BinaryWriter} writer */ proto.IdentifySessionMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.IdentifySessionMessage.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.IdentifySessionMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = this.getPid(); if (f !== 0) { writer.writeUint64( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.IdentifySessionMessage} The clone. */ proto.IdentifySessionMessage.prototype.cloneMessage = function() { return /** @type {!proto.IdentifySessionMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint64 id = 1; * @return {number} */ proto.IdentifySessionMessage.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.IdentifySessionMessage.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional uint64 pid = 2; * @return {number} */ proto.IdentifySessionMessage.prototype.getPid = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.IdentifySessionMessage.prototype.setPid = function(value) { jspb.Message.setField(this, 2, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.WriteToSessionMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.WriteToSessionMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.WriteToSessionMessage.displayName = 'proto.WriteToSessionMessage'; } 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_, 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.WriteToSessionMessage.prototype.toObject = function(opt_includeInstance) { return proto.WriteToSessionMessage.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.WriteToSessionMessage} msg The msg instance to transform. * @return {!Object} */ proto.WriteToSessionMessage.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId(), data: msg.getData_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.WriteToSessionMessage} */ proto.WriteToSessionMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.WriteToSessionMessage; return proto.WriteToSessionMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.WriteToSessionMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.WriteToSessionMessage} */ proto.WriteToSessionMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setData(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.WriteToSessionMessage} message * @param {!jspb.BinaryWriter} writer */ proto.WriteToSessionMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.WriteToSessionMessage.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.WriteToSessionMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = this.getData_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.WriteToSessionMessage} The clone. */ proto.WriteToSessionMessage.prototype.cloneMessage = function() { return /** @type {!proto.WriteToSessionMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint64 id = 1; * @return {number} */ proto.WriteToSessionMessage.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.WriteToSessionMessage.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional bytes data = 2; * @return {!(string|Uint8Array)} */ proto.WriteToSessionMessage.prototype.getData = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** * optional bytes data = 2; * This is a type-conversion wrapper around `getData()` * @return {string} */ proto.WriteToSessionMessage.prototype.getData_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getData())); }; /** * optional bytes data = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getData()` * @return {!Uint8Array} */ proto.WriteToSessionMessage.prototype.getData_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getData())); }; /** @param {!(string|Uint8Array)} value */ proto.WriteToSessionMessage.prototype.setData = function(value) { jspb.Message.setField(this, 2, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.ResizeSessionTTYMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ResizeSessionTTYMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.ResizeSessionTTYMessage.displayName = 'proto.ResizeSessionTTYMessage'; } 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_, 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.ResizeSessionTTYMessage.prototype.toObject = function(opt_includeInstance) { return proto.ResizeSessionTTYMessage.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.ResizeSessionTTYMessage} msg The msg instance to transform. * @return {!Object} */ proto.ResizeSessionTTYMessage.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId(), ttyDimensions: (f = msg.getTtyDimensions()) && proto.TTYDimensions.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.ResizeSessionTTYMessage} */ proto.ResizeSessionTTYMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ResizeSessionTTYMessage; return proto.ResizeSessionTTYMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ResizeSessionTTYMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ResizeSessionTTYMessage} */ proto.ResizeSessionTTYMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(value); break; case 2: var value = new proto.TTYDimensions; reader.readMessage(value,proto.TTYDimensions.deserializeBinaryFromReader); msg.setTtyDimensions(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.ResizeSessionTTYMessage} message * @param {!jspb.BinaryWriter} writer */ proto.ResizeSessionTTYMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ResizeSessionTTYMessage.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.ResizeSessionTTYMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = this.getTtyDimensions(); if (f != null) { writer.writeMessage( 2, f, proto.TTYDimensions.serializeBinaryToWriter ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.ResizeSessionTTYMessage} The clone. */ proto.ResizeSessionTTYMessage.prototype.cloneMessage = function() { return /** @type {!proto.ResizeSessionTTYMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint64 id = 1; * @return {number} */ proto.ResizeSessionTTYMessage.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.ResizeSessionTTYMessage.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional TTYDimensions tty_dimensions = 2; * @return {proto.TTYDimensions} */ proto.ResizeSessionTTYMessage.prototype.getTtyDimensions = function() { return /** @type{proto.TTYDimensions} */ ( jspb.Message.getWrapperField(this, proto.TTYDimensions, 2)); }; /** @param {proto.TTYDimensions|undefined} value */ proto.ResizeSessionTTYMessage.prototype.setTtyDimensions = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.ResizeSessionTTYMessage.prototype.clearTtyDimensions = function() { this.setTtyDimensions(undefined); }; /** * Returns whether this field is set. * @return{!boolean} */ proto.ResizeSessionTTYMessage.prototype.hasTtyDimensions = function() { return jspb.Message.getField(this, 2) != 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.CloseSessionInputMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.CloseSessionInputMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.CloseSessionInputMessage.displayName = 'proto.CloseSessionInputMessage'; } 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_, 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.CloseSessionInputMessage.prototype.toObject = function(opt_includeInstance) { return proto.CloseSessionInputMessage.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.CloseSessionInputMessage} msg The msg instance to transform. * @return {!Object} */ proto.CloseSessionInputMessage.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.CloseSessionInputMessage} */ proto.CloseSessionInputMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.CloseSessionInputMessage; return proto.CloseSessionInputMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.CloseSessionInputMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.CloseSessionInputMessage} */ proto.CloseSessionInputMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(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.CloseSessionInputMessage} message * @param {!jspb.BinaryWriter} writer */ proto.CloseSessionInputMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.CloseSessionInputMessage.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.CloseSessionInputMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.CloseSessionInputMessage} The clone. */ proto.CloseSessionInputMessage.prototype.cloneMessage = function() { return /** @type {!proto.CloseSessionInputMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint64 id = 1; * @return {number} */ proto.CloseSessionInputMessage.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.CloseSessionInputMessage.prototype.setId = function(value) { jspb.Message.setField(this, 1, 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.ShutdownSessionMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.ShutdownSessionMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.ShutdownSessionMessage.displayName = 'proto.ShutdownSessionMessage'; } 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_, 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.ShutdownSessionMessage.prototype.toObject = function(opt_includeInstance) { return proto.ShutdownSessionMessage.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.ShutdownSessionMessage} msg The msg instance to transform. * @return {!Object} */ proto.ShutdownSessionMessage.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId(), signal: msg.getSignal() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.ShutdownSessionMessage} */ proto.ShutdownSessionMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.ShutdownSessionMessage; return proto.ShutdownSessionMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.ShutdownSessionMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.ShutdownSessionMessage} */ proto.ShutdownSessionMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setSignal(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.ShutdownSessionMessage} message * @param {!jspb.BinaryWriter} writer */ proto.ShutdownSessionMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.ShutdownSessionMessage.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.ShutdownSessionMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = this.getSignal(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.ShutdownSessionMessage} The clone. */ proto.ShutdownSessionMessage.prototype.cloneMessage = function() { return /** @type {!proto.ShutdownSessionMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint64 id = 1; * @return {number} */ proto.ShutdownSessionMessage.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.ShutdownSessionMessage.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string signal = 2; * @return {string} */ proto.ShutdownSessionMessage.prototype.getSignal = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.ShutdownSessionMessage.prototype.setSignal = function(value) { jspb.Message.setField(this, 2, value); }; /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a * server response, or constructed directly in Javascript. The array is used * in place and becomes part of the constructed object. It is not cloned. * If no data is provided, the constructed object will be empty, but still * valid. * @extends {jspb.Message} * @constructor */ proto.SessionOutputMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.SessionOutputMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.SessionOutputMessage.displayName = 'proto.SessionOutputMessage'; } 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_, 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.SessionOutputMessage.prototype.toObject = function(opt_includeInstance) { return proto.SessionOutputMessage.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.SessionOutputMessage} msg The msg instance to transform. * @return {!Object} */ proto.SessionOutputMessage.toObject = function(includeInstance, msg) { var f, obj = { id: msg.getId(), fd: msg.getFd(), data: msg.getData_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.SessionOutputMessage} */ proto.SessionOutputMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.SessionOutputMessage; return proto.SessionOutputMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.SessionOutputMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.SessionOutputMessage} */ proto.SessionOutputMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setId(value); break; case 2: var value = /** @type {!proto.SessionOutputMessage.FD} */ (reader.readEnum()); msg.setFd(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setData(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.SessionOutputMessage} message * @param {!jspb.BinaryWriter} writer */ proto.SessionOutputMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.SessionOutputMessage.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.SessionOutputMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = this.getFd(); if (f !== 0.0) { writer.writeEnum( 2, f ); } f = this.getData_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.SessionOutputMessage} The clone. */ proto.SessionOutputMessage.prototype.cloneMessage = function() { return /** @type {!proto.SessionOutputMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint64 id = 1; * @return {number} */ proto.SessionOutputMessage.prototype.getId = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.SessionOutputMessage.prototype.setId = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional FD fd = 2; * @return {!proto.SessionOutputMessage.FD} */ proto.SessionOutputMessage.prototype.getFd = function() { return /** @type {!proto.SessionOutputMessage.FD} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {!proto.SessionOutputMessage.FD} value */ proto.SessionOutputMessage.prototype.setFd = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional bytes data = 3; * @return {!(string|Uint8Array)} */ proto.SessionOutputMessage.prototype.getData = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** * optional bytes data = 3; * This is a type-conversion wrapper around `getData()` * @return {string} */ proto.SessionOutputMessage.prototype.getData_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getData())); }; /** * optional bytes data = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getData()` * @return {!Uint8Array} */ proto.SessionOutputMessage.prototype.getData_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getData())); }; /** @param {!(string|Uint8Array)} value */ proto.SessionOutputMessage.prototype.setData = function(value) { jspb.Message.setField(this, 3, value); }; /** * @enum {number} */ proto.SessionOutputMessage.FD = { STDOUT: 0, STDERR: 1 }; /** * 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.TTYDimensions = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.TTYDimensions, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.TTYDimensions.displayName = 'proto.TTYDimensions'; } 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_, 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.TTYDimensions.prototype.toObject = function(opt_includeInstance) { return proto.TTYDimensions.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.TTYDimensions} msg The msg instance to transform. * @return {!Object} */ proto.TTYDimensions.toObject = function(includeInstance, msg) { var f, obj = { height: msg.getHeight(), width: msg.getWidth() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.TTYDimensions} */ proto.TTYDimensions.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.TTYDimensions; return proto.TTYDimensions.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.TTYDimensions} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.TTYDimensions} */ proto.TTYDimensions.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint32()); msg.setHeight(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setWidth(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.TTYDimensions} message * @param {!jspb.BinaryWriter} writer */ proto.TTYDimensions.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.TTYDimensions.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.TTYDimensions.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getHeight(); if (f !== 0) { writer.writeUint32( 1, f ); } f = this.getWidth(); if (f !== 0) { writer.writeUint32( 2, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.TTYDimensions} The clone. */ proto.TTYDimensions.prototype.cloneMessage = function() { return /** @type {!proto.TTYDimensions} */ (jspb.Message.cloneMessage(this)); }; /** * optional uint32 height = 1; * @return {number} */ proto.TTYDimensions.prototype.getHeight = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.TTYDimensions.prototype.setHeight = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional uint32 width = 2; * @return {number} */ proto.TTYDimensions.prototype.getWidth = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); }; /** @param {number} value */ proto.TTYDimensions.prototype.setWidth = function(value) { jspb.Message.setField(this, 2, value); }; goog.object.extend(exports, proto);