UNPKG

teletype-client-modified

Version:

I have modified the library developed by Atom to make it compatible with non-browser facility. I am using it only for experimentation purposes. I will remove this package post my experiment and raise a PR at Atom to finally merge this package so that this

1,582 lines (1,353 loc) 86.7 kB
/** * @fileoverview * @enhanceable * @suppress {messageConventions} JS Compiler reports an error if a variable or * field starts with 'MSG_' and isn't a translatable message. * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); goog.exportSymbol('proto.Operation', null, global); goog.exportSymbol('proto.Operation.MarkersUpdate', null, global); goog.exportSymbol('proto.Operation.MarkersUpdate.LayerOperation', null, global); goog.exportSymbol('proto.Operation.MarkersUpdate.LogicalRange', null, global); goog.exportSymbol('proto.Operation.MarkersUpdate.MarkerOperation', null, global); goog.exportSymbol('proto.Operation.MarkersUpdate.MarkerUpdate', null, global); goog.exportSymbol('proto.Operation.Point', null, global); goog.exportSymbol('proto.Operation.Splice', null, global); goog.exportSymbol('proto.Operation.Splice.Deletion', null, global); goog.exportSymbol('proto.Operation.Splice.Insertion', null, global); goog.exportSymbol('proto.Operation.SpliceId', null, global); goog.exportSymbol('proto.Operation.Undo', 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.Operation = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.Operation.oneofGroups_); }; goog.inherits(proto.Operation, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.Operation.displayName = 'proto.Operation'; } /** * 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.Operation.oneofGroups_ = [[1,2,3]]; /** * @enum {number} */ proto.Operation.VariantCase = { VARIANT_NOT_SET: 0, SPLICE: 1, UNDO: 2, MARKERS_UPDATE: 3 }; /** * @return {proto.Operation.VariantCase} */ proto.Operation.prototype.getVariantCase = function() { return /** @type {proto.Operation.VariantCase} */(jspb.Message.computeOneofCase(this, proto.Operation.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.Operation.prototype.toObject = function(opt_includeInstance) { return proto.Operation.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.Operation} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.toObject = function(includeInstance, msg) { var f, obj = { splice: (f = msg.getSplice()) && proto.Operation.Splice.toObject(includeInstance, f), undo: (f = msg.getUndo()) && proto.Operation.Undo.toObject(includeInstance, f), markersUpdate: (f = msg.getMarkersUpdate()) && proto.Operation.MarkersUpdate.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.Operation} */ proto.Operation.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.Operation; return proto.Operation.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.Operation} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.Operation} */ proto.Operation.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.Operation.Splice; reader.readMessage(value,proto.Operation.Splice.deserializeBinaryFromReader); msg.setSplice(value); break; case 2: var value = new proto.Operation.Undo; reader.readMessage(value,proto.Operation.Undo.deserializeBinaryFromReader); msg.setUndo(value); break; case 3: var value = new proto.Operation.MarkersUpdate; reader.readMessage(value,proto.Operation.MarkersUpdate.deserializeBinaryFromReader); msg.setMarkersUpdate(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.Operation.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.Operation.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.Operation} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSplice(); if (f != null) { writer.writeMessage( 1, f, proto.Operation.Splice.serializeBinaryToWriter ); } f = message.getUndo(); if (f != null) { writer.writeMessage( 2, f, proto.Operation.Undo.serializeBinaryToWriter ); } f = message.getMarkersUpdate(); if (f != null) { writer.writeMessage( 3, f, proto.Operation.MarkersUpdate.serializeBinaryToWriter ); } }; /** * 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.Operation.Splice = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.Operation.Splice, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.Operation.Splice.displayName = 'proto.Operation.Splice'; } 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.Operation.Splice.prototype.toObject = function(opt_includeInstance) { return proto.Operation.Splice.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.Operation.Splice} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.Splice.toObject = function(includeInstance, msg) { var f, obj = { spliceId: (f = msg.getSpliceId()) && proto.Operation.SpliceId.toObject(includeInstance, f), insertion: (f = msg.getInsertion()) && proto.Operation.Splice.Insertion.toObject(includeInstance, f), deletion: (f = msg.getDeletion()) && proto.Operation.Splice.Deletion.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.Operation.Splice} */ proto.Operation.Splice.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.Operation.Splice; return proto.Operation.Splice.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.Operation.Splice} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.Operation.Splice} */ proto.Operation.Splice.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.Operation.SpliceId; reader.readMessage(value,proto.Operation.SpliceId.deserializeBinaryFromReader); msg.setSpliceId(value); break; case 2: var value = new proto.Operation.Splice.Insertion; reader.readMessage(value,proto.Operation.Splice.Insertion.deserializeBinaryFromReader); msg.setInsertion(value); break; case 3: var value = new proto.Operation.Splice.Deletion; reader.readMessage(value,proto.Operation.Splice.Deletion.deserializeBinaryFromReader); msg.setDeletion(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.Operation.Splice.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.Operation.Splice.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.Operation.Splice} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.Splice.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSpliceId(); if (f != null) { writer.writeMessage( 1, f, proto.Operation.SpliceId.serializeBinaryToWriter ); } f = message.getInsertion(); if (f != null) { writer.writeMessage( 2, f, proto.Operation.Splice.Insertion.serializeBinaryToWriter ); } f = message.getDeletion(); if (f != null) { writer.writeMessage( 3, f, proto.Operation.Splice.Deletion.serializeBinaryToWriter ); } }; /** * 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.Operation.Splice.Insertion = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.Operation.Splice.Insertion, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.Operation.Splice.Insertion.displayName = 'proto.Operation.Splice.Insertion'; } 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.Operation.Splice.Insertion.prototype.toObject = function(opt_includeInstance) { return proto.Operation.Splice.Insertion.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.Operation.Splice.Insertion} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.Splice.Insertion.toObject = function(includeInstance, msg) { var f, obj = { text: jspb.Message.getFieldWithDefault(msg, 2, ""), leftDependencyId: (f = msg.getLeftDependencyId()) && proto.Operation.SpliceId.toObject(includeInstance, f), offsetInLeftDependency: (f = msg.getOffsetInLeftDependency()) && proto.Operation.Point.toObject(includeInstance, f), rightDependencyId: (f = msg.getRightDependencyId()) && proto.Operation.SpliceId.toObject(includeInstance, f), offsetInRightDependency: (f = msg.getOffsetInRightDependency()) && proto.Operation.Point.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.Operation.Splice.Insertion} */ proto.Operation.Splice.Insertion.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.Operation.Splice.Insertion; return proto.Operation.Splice.Insertion.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.Operation.Splice.Insertion} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.Operation.Splice.Insertion} */ proto.Operation.Splice.Insertion.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = /** @type {string} */ (reader.readString()); msg.setText(value); break; case 3: var value = new proto.Operation.SpliceId; reader.readMessage(value,proto.Operation.SpliceId.deserializeBinaryFromReader); msg.setLeftDependencyId(value); break; case 4: var value = new proto.Operation.Point; reader.readMessage(value,proto.Operation.Point.deserializeBinaryFromReader); msg.setOffsetInLeftDependency(value); break; case 5: var value = new proto.Operation.SpliceId; reader.readMessage(value,proto.Operation.SpliceId.deserializeBinaryFromReader); msg.setRightDependencyId(value); break; case 6: var value = new proto.Operation.Point; reader.readMessage(value,proto.Operation.Point.deserializeBinaryFromReader); msg.setOffsetInRightDependency(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.Operation.Splice.Insertion.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.Operation.Splice.Insertion.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.Operation.Splice.Insertion} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.Splice.Insertion.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getText(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getLeftDependencyId(); if (f != null) { writer.writeMessage( 3, f, proto.Operation.SpliceId.serializeBinaryToWriter ); } f = message.getOffsetInLeftDependency(); if (f != null) { writer.writeMessage( 4, f, proto.Operation.Point.serializeBinaryToWriter ); } f = message.getRightDependencyId(); if (f != null) { writer.writeMessage( 5, f, proto.Operation.SpliceId.serializeBinaryToWriter ); } f = message.getOffsetInRightDependency(); if (f != null) { writer.writeMessage( 6, f, proto.Operation.Point.serializeBinaryToWriter ); } }; /** * optional string text = 2; * @return {string} */ proto.Operation.Splice.Insertion.prototype.getText = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.Operation.Splice.Insertion.prototype.setText = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional SpliceId left_dependency_id = 3; * @return {?proto.Operation.SpliceId} */ proto.Operation.Splice.Insertion.prototype.getLeftDependencyId = function() { return /** @type{?proto.Operation.SpliceId} */ ( jspb.Message.getWrapperField(this, proto.Operation.SpliceId, 3)); }; /** @param {?proto.Operation.SpliceId|undefined} value */ proto.Operation.Splice.Insertion.prototype.setLeftDependencyId = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.Operation.Splice.Insertion.prototype.clearLeftDependencyId = function() { this.setLeftDependencyId(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.Insertion.prototype.hasLeftDependencyId = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional Point offset_in_left_dependency = 4; * @return {?proto.Operation.Point} */ proto.Operation.Splice.Insertion.prototype.getOffsetInLeftDependency = function() { return /** @type{?proto.Operation.Point} */ ( jspb.Message.getWrapperField(this, proto.Operation.Point, 4)); }; /** @param {?proto.Operation.Point|undefined} value */ proto.Operation.Splice.Insertion.prototype.setOffsetInLeftDependency = function(value) { jspb.Message.setWrapperField(this, 4, value); }; proto.Operation.Splice.Insertion.prototype.clearOffsetInLeftDependency = function() { this.setOffsetInLeftDependency(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.Insertion.prototype.hasOffsetInLeftDependency = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional SpliceId right_dependency_id = 5; * @return {?proto.Operation.SpliceId} */ proto.Operation.Splice.Insertion.prototype.getRightDependencyId = function() { return /** @type{?proto.Operation.SpliceId} */ ( jspb.Message.getWrapperField(this, proto.Operation.SpliceId, 5)); }; /** @param {?proto.Operation.SpliceId|undefined} value */ proto.Operation.Splice.Insertion.prototype.setRightDependencyId = function(value) { jspb.Message.setWrapperField(this, 5, value); }; proto.Operation.Splice.Insertion.prototype.clearRightDependencyId = function() { this.setRightDependencyId(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.Insertion.prototype.hasRightDependencyId = function() { return jspb.Message.getField(this, 5) != null; }; /** * optional Point offset_in_right_dependency = 6; * @return {?proto.Operation.Point} */ proto.Operation.Splice.Insertion.prototype.getOffsetInRightDependency = function() { return /** @type{?proto.Operation.Point} */ ( jspb.Message.getWrapperField(this, proto.Operation.Point, 6)); }; /** @param {?proto.Operation.Point|undefined} value */ proto.Operation.Splice.Insertion.prototype.setOffsetInRightDependency = function(value) { jspb.Message.setWrapperField(this, 6, value); }; proto.Operation.Splice.Insertion.prototype.clearOffsetInRightDependency = function() { this.setOffsetInRightDependency(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.Insertion.prototype.hasOffsetInRightDependency = 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.Operation.Splice.Deletion = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.Operation.Splice.Deletion, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.Operation.Splice.Deletion.displayName = 'proto.Operation.Splice.Deletion'; } 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.Operation.Splice.Deletion.prototype.toObject = function(opt_includeInstance) { return proto.Operation.Splice.Deletion.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.Operation.Splice.Deletion} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.Splice.Deletion.toObject = function(includeInstance, msg) { var f, obj = { leftDependencyId: (f = msg.getLeftDependencyId()) && proto.Operation.SpliceId.toObject(includeInstance, f), offsetInLeftDependency: (f = msg.getOffsetInLeftDependency()) && proto.Operation.Point.toObject(includeInstance, f), rightDependencyId: (f = msg.getRightDependencyId()) && proto.Operation.SpliceId.toObject(includeInstance, f), offsetInRightDependency: (f = msg.getOffsetInRightDependency()) && proto.Operation.Point.toObject(includeInstance, f), maxSeqsBySiteMap: (f = msg.getMaxSeqsBySiteMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.Operation.Splice.Deletion} */ proto.Operation.Splice.Deletion.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.Operation.Splice.Deletion; return proto.Operation.Splice.Deletion.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.Operation.Splice.Deletion} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.Operation.Splice.Deletion} */ proto.Operation.Splice.Deletion.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 2: var value = new proto.Operation.SpliceId; reader.readMessage(value,proto.Operation.SpliceId.deserializeBinaryFromReader); msg.setLeftDependencyId(value); break; case 3: var value = new proto.Operation.Point; reader.readMessage(value,proto.Operation.Point.deserializeBinaryFromReader); msg.setOffsetInLeftDependency(value); break; case 4: var value = new proto.Operation.SpliceId; reader.readMessage(value,proto.Operation.SpliceId.deserializeBinaryFromReader); msg.setRightDependencyId(value); break; case 5: var value = new proto.Operation.Point; reader.readMessage(value,proto.Operation.Point.deserializeBinaryFromReader); msg.setOffsetInRightDependency(value); break; case 6: var value = msg.getMaxSeqsBySiteMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readUint32); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.Operation.Splice.Deletion.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.Operation.Splice.Deletion.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.Operation.Splice.Deletion} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.Splice.Deletion.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getLeftDependencyId(); if (f != null) { writer.writeMessage( 2, f, proto.Operation.SpliceId.serializeBinaryToWriter ); } f = message.getOffsetInLeftDependency(); if (f != null) { writer.writeMessage( 3, f, proto.Operation.Point.serializeBinaryToWriter ); } f = message.getRightDependencyId(); if (f != null) { writer.writeMessage( 4, f, proto.Operation.SpliceId.serializeBinaryToWriter ); } f = message.getOffsetInRightDependency(); if (f != null) { writer.writeMessage( 5, f, proto.Operation.Point.serializeBinaryToWriter ); } f = message.getMaxSeqsBySiteMap(true); if (f && f.getLength() > 0) { f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeUint32); } }; /** * optional SpliceId left_dependency_id = 2; * @return {?proto.Operation.SpliceId} */ proto.Operation.Splice.Deletion.prototype.getLeftDependencyId = function() { return /** @type{?proto.Operation.SpliceId} */ ( jspb.Message.getWrapperField(this, proto.Operation.SpliceId, 2)); }; /** @param {?proto.Operation.SpliceId|undefined} value */ proto.Operation.Splice.Deletion.prototype.setLeftDependencyId = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.Operation.Splice.Deletion.prototype.clearLeftDependencyId = function() { this.setLeftDependencyId(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.Deletion.prototype.hasLeftDependencyId = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional Point offset_in_left_dependency = 3; * @return {?proto.Operation.Point} */ proto.Operation.Splice.Deletion.prototype.getOffsetInLeftDependency = function() { return /** @type{?proto.Operation.Point} */ ( jspb.Message.getWrapperField(this, proto.Operation.Point, 3)); }; /** @param {?proto.Operation.Point|undefined} value */ proto.Operation.Splice.Deletion.prototype.setOffsetInLeftDependency = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.Operation.Splice.Deletion.prototype.clearOffsetInLeftDependency = function() { this.setOffsetInLeftDependency(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.Deletion.prototype.hasOffsetInLeftDependency = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional SpliceId right_dependency_id = 4; * @return {?proto.Operation.SpliceId} */ proto.Operation.Splice.Deletion.prototype.getRightDependencyId = function() { return /** @type{?proto.Operation.SpliceId} */ ( jspb.Message.getWrapperField(this, proto.Operation.SpliceId, 4)); }; /** @param {?proto.Operation.SpliceId|undefined} value */ proto.Operation.Splice.Deletion.prototype.setRightDependencyId = function(value) { jspb.Message.setWrapperField(this, 4, value); }; proto.Operation.Splice.Deletion.prototype.clearRightDependencyId = function() { this.setRightDependencyId(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.Deletion.prototype.hasRightDependencyId = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional Point offset_in_right_dependency = 5; * @return {?proto.Operation.Point} */ proto.Operation.Splice.Deletion.prototype.getOffsetInRightDependency = function() { return /** @type{?proto.Operation.Point} */ ( jspb.Message.getWrapperField(this, proto.Operation.Point, 5)); }; /** @param {?proto.Operation.Point|undefined} value */ proto.Operation.Splice.Deletion.prototype.setOffsetInRightDependency = function(value) { jspb.Message.setWrapperField(this, 5, value); }; proto.Operation.Splice.Deletion.prototype.clearOffsetInRightDependency = function() { this.setOffsetInRightDependency(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.Deletion.prototype.hasOffsetInRightDependency = function() { return jspb.Message.getField(this, 5) != null; }; /** * map<uint32, uint32> max_seqs_by_site = 6; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<number,number>} */ proto.Operation.Splice.Deletion.prototype.getMaxSeqsBySiteMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<number,number>} */ ( jspb.Message.getMapField(this, 6, opt_noLazyCreate, null)); }; proto.Operation.Splice.Deletion.prototype.clearMaxSeqsBySiteMap = function() { this.getMaxSeqsBySiteMap().clear(); }; /** * optional SpliceId splice_id = 1; * @return {?proto.Operation.SpliceId} */ proto.Operation.Splice.prototype.getSpliceId = function() { return /** @type{?proto.Operation.SpliceId} */ ( jspb.Message.getWrapperField(this, proto.Operation.SpliceId, 1)); }; /** @param {?proto.Operation.SpliceId|undefined} value */ proto.Operation.Splice.prototype.setSpliceId = function(value) { jspb.Message.setWrapperField(this, 1, value); }; proto.Operation.Splice.prototype.clearSpliceId = function() { this.setSpliceId(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.prototype.hasSpliceId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional Insertion insertion = 2; * @return {?proto.Operation.Splice.Insertion} */ proto.Operation.Splice.prototype.getInsertion = function() { return /** @type{?proto.Operation.Splice.Insertion} */ ( jspb.Message.getWrapperField(this, proto.Operation.Splice.Insertion, 2)); }; /** @param {?proto.Operation.Splice.Insertion|undefined} value */ proto.Operation.Splice.prototype.setInsertion = function(value) { jspb.Message.setWrapperField(this, 2, value); }; proto.Operation.Splice.prototype.clearInsertion = function() { this.setInsertion(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.prototype.hasInsertion = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional Deletion deletion = 3; * @return {?proto.Operation.Splice.Deletion} */ proto.Operation.Splice.prototype.getDeletion = function() { return /** @type{?proto.Operation.Splice.Deletion} */ ( jspb.Message.getWrapperField(this, proto.Operation.Splice.Deletion, 3)); }; /** @param {?proto.Operation.Splice.Deletion|undefined} value */ proto.Operation.Splice.prototype.setDeletion = function(value) { jspb.Message.setWrapperField(this, 3, value); }; proto.Operation.Splice.prototype.clearDeletion = function() { this.setDeletion(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Splice.prototype.hasDeletion = function() { return jspb.Message.getField(this, 3) != 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.Operation.Undo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.Operation.Undo, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.Operation.Undo.displayName = 'proto.Operation.Undo'; } 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.Operation.Undo.prototype.toObject = function(opt_includeInstance) { return proto.Operation.Undo.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.Operation.Undo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.Undo.toObject = function(includeInstance, msg) { var f, obj = { spliceId: (f = msg.getSpliceId()) && proto.Operation.SpliceId.toObject(includeInstance, f), undoCount: jspb.Message.getFieldWithDefault(msg, 2, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.Operation.Undo} */ proto.Operation.Undo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.Operation.Undo; return proto.Operation.Undo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.Operation.Undo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.Operation.Undo} */ proto.Operation.Undo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.Operation.SpliceId; reader.readMessage(value,proto.Operation.SpliceId.deserializeBinaryFromReader); msg.setSpliceId(value); break; case 2: var value = /** @type {number} */ (reader.readUint32()); msg.setUndoCount(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.Operation.Undo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.Operation.Undo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.Operation.Undo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.Undo.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSpliceId(); if (f != null) { writer.writeMessage( 1, f, proto.Operation.SpliceId.serializeBinaryToWriter ); } f = message.getUndoCount(); if (f !== 0) { writer.writeUint32( 2, f ); } }; /** * optional SpliceId splice_id = 1; * @return {?proto.Operation.SpliceId} */ proto.Operation.Undo.prototype.getSpliceId = function() { return /** @type{?proto.Operation.SpliceId} */ ( jspb.Message.getWrapperField(this, proto.Operation.SpliceId, 1)); }; /** @param {?proto.Operation.SpliceId|undefined} value */ proto.Operation.Undo.prototype.setSpliceId = function(value) { jspb.Message.setWrapperField(this, 1, value); }; proto.Operation.Undo.prototype.clearSpliceId = function() { this.setSpliceId(undefined); }; /** * Returns whether this field is set. * @return {!boolean} */ proto.Operation.Undo.prototype.hasSpliceId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional uint32 undo_count = 2; * @return {number} */ proto.Operation.Undo.prototype.getUndoCount = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ proto.Operation.Undo.prototype.setUndoCount = function(value) { jspb.Message.setProto3IntField(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.Operation.MarkersUpdate = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.Operation.MarkersUpdate, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.Operation.MarkersUpdate.displayName = 'proto.Operation.MarkersUpdate'; } 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.Operation.MarkersUpdate.prototype.toObject = function(opt_includeInstance) { return proto.Operation.MarkersUpdate.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.Operation.MarkersUpdate} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.MarkersUpdate.toObject = function(includeInstance, msg) { var f, obj = { siteId: jspb.Message.getFieldWithDefault(msg, 1, 0), layerOperationsMap: (f = msg.getLayerOperationsMap()) ? f.toObject(includeInstance, proto.Operation.MarkersUpdate.LayerOperation.toObject) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.Operation.MarkersUpdate} */ proto.Operation.MarkersUpdate.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.Operation.MarkersUpdate; return proto.Operation.MarkersUpdate.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.Operation.MarkersUpdate} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.Operation.MarkersUpdate} */ proto.Operation.MarkersUpdate.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.setSiteId(value); break; case 2: var value = msg.getLayerOperationsMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.Operation.MarkersUpdate.LayerOperation.deserializeBinaryFromReader); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.Operation.MarkersUpdate.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.Operation.MarkersUpdate.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.Operation.MarkersUpdate} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.MarkersUpdate.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getSiteId(); if (f !== 0) { writer.writeUint32( 1, f ); } f = message.getLayerOperationsMap(true); if (f && f.getLength() > 0) { f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.Operation.MarkersUpdate.LayerOperation.serializeBinaryToWriter); } }; /** * 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.Operation.MarkersUpdate.LayerOperation = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.Operation.MarkersUpdate.LayerOperation, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.Operation.MarkersUpdate.LayerOperation.displayName = 'proto.Operation.MarkersUpdate.LayerOperation'; } 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.Operation.MarkersUpdate.LayerOperation.prototype.toObject = function(opt_includeInstance) { return proto.Operation.MarkersUpdate.LayerOperation.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.Operation.MarkersUpdate.LayerOperation} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.MarkersUpdate.LayerOperation.toObject = function(includeInstance, msg) { var f, obj = { isDeletion: jspb.Message.getFieldWithDefault(msg, 1, false), markerOperationsMap: (f = msg.getMarkerOperationsMap()) ? f.toObject(includeInstance, proto.Operation.MarkersUpdate.MarkerOperation.toObject) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.Operation.MarkersUpdate.LayerOperation} */ proto.Operation.MarkersUpdate.LayerOperation.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.Operation.MarkersUpdate.LayerOperation; return proto.Operation.MarkersUpdate.LayerOperation.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.Operation.MarkersUpdate.LayerOperation} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.Operation.MarkersUpdate.LayerOperation} */ proto.Operation.MarkersUpdate.LayerOperation.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsDeletion(value); break; case 2: var value = msg.getMarkerOperationsMap(); reader.readMessage(value, function(message, reader) { jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readUint32, jspb.BinaryReader.prototype.readMessage, proto.Operation.MarkersUpdate.MarkerOperation.deserializeBinaryFromReader); }); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.Operation.MarkersUpdate.LayerOperation.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.Operation.MarkersUpdate.LayerOperation.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.Operation.MarkersUpdate.LayerOperation} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.Operation.MarkersUpdate.LayerOperation.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIsDeletion(); if (f) { writer.writeBool( 1, f ); } f = message.getMarkerOperationsMap(true); if (f && f.getLength() > 0) { f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeUint32, jspb.BinaryWriter.prototype.writeMessage, proto.Operation.MarkersUpdate.MarkerOperation.serializeBinaryToWriter); } }; /** * optional bool is_deletion = 1; * 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.Operation.MarkersUpdate.LayerOperation.prototype.getIsDeletion = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 1, false)); }; /** @param {boolean} value */ proto.Operation.MarkersUpdate.LayerOperation.prototype.setIsDeletion = function(value) { jspb.Message.setProto3BooleanField(this, 1, value); }; /** * map<uint32, MarkerOperation> marker_operations = 2; * @param {boolean=} opt_noLazyCreate Do not create the map if * empty, instead returning `undefined` * @return {!jspb.Map<number,!proto.Operation.MarkersUpdate.MarkerOperation>} */ proto.Operation.MarkersUpdate.LayerOperation.prototype.getMarkerOperationsMap = function(opt_noLazyCreate) { return /** @type {!jspb.Map<number,!proto.Operation.MarkersUpdate.MarkerOperation>} */ ( jspb.Message.getMapField(this, 2, opt_noLaz