UNPKG

bifcore-sdk-nodejs-bop

Version:
1,688 lines (1,436 loc) 90.9 kB
/** * @fileoverview * @enhanceable * @public */ // GENERATED CODE -- DO NOT EDIT! var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); goog.exportSymbol('proto.protocol.BoolValue', null, global); goog.exportSymbol('proto.protocol.ERRORCODE', null, global); goog.exportSymbol('proto.protocol.FeeConfig', null, global); goog.exportSymbol('proto.protocol.FeeConfig.Type', null, global); goog.exportSymbol('proto.protocol.Int32Value', null, global); goog.exportSymbol('proto.protocol.KeyPair', null, global); goog.exportSymbol('proto.protocol.LedgerUpgrade', null, global); goog.exportSymbol('proto.protocol.ModifyKey', null, global); goog.exportSymbol('proto.protocol.NewKey', null, global); goog.exportSymbol('proto.protocol.Ping', null, global); goog.exportSymbol('proto.protocol.Pong', null, global); goog.exportSymbol('proto.protocol.Signature', null, global); goog.exportSymbol('proto.protocol.Snapshot', null, global); goog.exportSymbol('proto.protocol.StringValue', null, global); goog.exportSymbol('proto.protocol.Validator', null, global); goog.exportSymbol('proto.protocol.ValidatorSet', null, global); goog.exportSymbol('proto.protocol.WsMessage', 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.protocol.KeyPair = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.KeyPair, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.KeyPair.displayName = 'proto.protocol.KeyPair'; } 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.protocol.KeyPair.prototype.toObject = function(opt_includeInstance) { return proto.protocol.KeyPair.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.protocol.KeyPair} msg The msg instance to transform. * @return {!Object} */ proto.protocol.KeyPair.toObject = function(includeInstance, msg) { var f, obj = { key: msg.getKey(), value: msg.getValue(), version: msg.getVersion() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.KeyPair} */ proto.protocol.KeyPair.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.KeyPair; return proto.protocol.KeyPair.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.KeyPair} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.KeyPair} */ proto.protocol.KeyPair.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setKey(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setValue(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setVersion(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.protocol.KeyPair} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.KeyPair.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.KeyPair.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.protocol.KeyPair.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getKey(); if (f.length > 0) { writer.writeString( 1, f ); } f = this.getValue(); if (f.length > 0) { writer.writeString( 2, f ); } f = this.getVersion(); if (f !== 0) { writer.writeInt64( 3, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.protocol.KeyPair} The clone. */ proto.protocol.KeyPair.prototype.cloneMessage = function() { return /** @type {!proto.protocol.KeyPair} */ (jspb.Message.cloneMessage(this)); }; /** * optional string key = 1; * @return {string} */ proto.protocol.KeyPair.prototype.getKey = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** @param {string} value */ proto.protocol.KeyPair.prototype.setKey = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional string value = 2; * @return {string} */ proto.protocol.KeyPair.prototype.getValue = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** @param {string} value */ proto.protocol.KeyPair.prototype.setValue = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional int64 version = 3; * @return {number} */ proto.protocol.KeyPair.prototype.getVersion = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); }; /** @param {number} value */ proto.protocol.KeyPair.prototype.setVersion = function(value) { jspb.Message.setField(this, 3, 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.protocol.Signature = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.Signature, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.Signature.displayName = 'proto.protocol.Signature'; } 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.protocol.Signature.prototype.toObject = function(opt_includeInstance) { return proto.protocol.Signature.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.protocol.Signature} msg The msg instance to transform. * @return {!Object} */ proto.protocol.Signature.toObject = function(includeInstance, msg) { var f, obj = { publicKey: msg.getPublicKey(), signData: msg.getSignData_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.protocol.Signature} */ proto.protocol.Signature.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.Signature; return proto.protocol.Signature.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.Signature} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.Signature} */ proto.protocol.Signature.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setPublicKey(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setSignData(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.protocol.Signature} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.Signature.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.Signature.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.protocol.Signature.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getPublicKey(); if (f.length > 0) { writer.writeString( 1, f ); } f = this.getSignData_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.protocol.Signature} The clone. */ proto.protocol.Signature.prototype.cloneMessage = function() { return /** @type {!proto.protocol.Signature} */ (jspb.Message.cloneMessage(this)); }; /** * optional string public_key = 1; * @return {string} */ proto.protocol.Signature.prototype.getPublicKey = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** @param {string} value */ proto.protocol.Signature.prototype.setPublicKey = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional bytes sign_data = 2; * @return {!(string|Uint8Array)} */ proto.protocol.Signature.prototype.getSignData = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** * optional bytes sign_data = 2; * This is a type-conversion wrapper around `getSignData()` * @return {string} */ proto.protocol.Signature.prototype.getSignData_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getSignData())); }; /** * optional bytes sign_data = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getSignData()` * @return {!Uint8Array} */ proto.protocol.Signature.prototype.getSignData_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getSignData())); }; /** @param {!(string|Uint8Array)} value */ proto.protocol.Signature.prototype.setSignData = 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.protocol.LedgerUpgrade = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.LedgerUpgrade.repeatedFields_, null); }; goog.inherits(proto.protocol.LedgerUpgrade, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.LedgerUpgrade.displayName = 'proto.protocol.LedgerUpgrade'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.protocol.LedgerUpgrade.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.protocol.LedgerUpgrade.prototype.toObject = function(opt_includeInstance) { return proto.protocol.LedgerUpgrade.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.protocol.LedgerUpgrade} msg The msg instance to transform. * @return {!Object} */ proto.protocol.LedgerUpgrade.toObject = function(includeInstance, msg) { var f, obj = { newLedgerVersion: msg.getNewLedgerVersion(), newValidatorListList: jspb.Message.getField(msg, 2), chainCode: msg.getChainCode() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.LedgerUpgrade} */ proto.protocol.LedgerUpgrade.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.LedgerUpgrade; return proto.protocol.LedgerUpgrade.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.LedgerUpgrade} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.LedgerUpgrade} */ proto.protocol.LedgerUpgrade.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setNewLedgerVersion(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.getNewValidatorListList().push(value); msg.setNewValidatorListList(msg.getNewValidatorListList()); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setChainCode(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.protocol.LedgerUpgrade} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.LedgerUpgrade.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.LedgerUpgrade.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.protocol.LedgerUpgrade.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getNewLedgerVersion(); if (f !== 0) { writer.writeInt64( 1, f ); } f = this.getNewValidatorListList(); if (f.length > 0) { writer.writeRepeatedString( 2, f ); } f = this.getChainCode(); if (f.length > 0) { writer.writeString( 3, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.protocol.LedgerUpgrade} The clone. */ proto.protocol.LedgerUpgrade.prototype.cloneMessage = function() { return /** @type {!proto.protocol.LedgerUpgrade} */ (jspb.Message.cloneMessage(this)); }; /** * optional int64 new_ledger_version = 1; * @return {number} */ proto.protocol.LedgerUpgrade.prototype.getNewLedgerVersion = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.protocol.LedgerUpgrade.prototype.setNewLedgerVersion = function(value) { jspb.Message.setField(this, 1, value); }; /** * repeated string new_validator_list = 2; * 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.<string>} */ proto.protocol.LedgerUpgrade.prototype.getNewValidatorListList = function() { return /** @type {!Array.<string>} */ (jspb.Message.getField(this, 2)); }; /** @param {Array.<string>} value */ proto.protocol.LedgerUpgrade.prototype.setNewValidatorListList = function(value) { jspb.Message.setField(this, 2, value || []); }; proto.protocol.LedgerUpgrade.prototype.clearNewValidatorListList = function() { jspb.Message.setField(this, 2, []); }; /** * optional string chain_code = 3; * @return {string} */ proto.protocol.LedgerUpgrade.prototype.getChainCode = function() { return /** @type {string} */ (jspb.Message.getFieldProto3(this, 3, "")); }; /** @param {string} value */ proto.protocol.LedgerUpgrade.prototype.setChainCode = function(value) { jspb.Message.setField(this, 3, 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.protocol.WsMessage = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.WsMessage, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.WsMessage.displayName = 'proto.protocol.WsMessage'; } 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.protocol.WsMessage.prototype.toObject = function(opt_includeInstance) { return proto.protocol.WsMessage.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.protocol.WsMessage} msg The msg instance to transform. * @return {!Object} */ proto.protocol.WsMessage.toObject = function(includeInstance, msg) { var f, obj = { type: msg.getType(), request: msg.getRequest(), sequence: msg.getSequence(), 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.protocol.WsMessage} */ proto.protocol.WsMessage.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.WsMessage; return proto.protocol.WsMessage.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.WsMessage} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.WsMessage} */ proto.protocol.WsMessage.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setType(value); break; case 2: var value = /** @type {boolean} */ (reader.readBool()); msg.setRequest(value); break; case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setSequence(value); break; case 4: 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.protocol.WsMessage} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.WsMessage.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.WsMessage.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.protocol.WsMessage.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getType(); if (f !== 0) { writer.writeInt64( 1, f ); } f = this.getRequest(); if (f) { writer.writeBool( 2, f ); } f = this.getSequence(); if (f !== 0) { writer.writeInt64( 3, f ); } f = this.getData_asU8(); if (f.length > 0) { writer.writeBytes( 4, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.protocol.WsMessage} The clone. */ proto.protocol.WsMessage.prototype.cloneMessage = function() { return /** @type {!proto.protocol.WsMessage} */ (jspb.Message.cloneMessage(this)); }; /** * optional int64 type = 1; * @return {number} */ proto.protocol.WsMessage.prototype.getType = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.protocol.WsMessage.prototype.setType = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional bool request = 2; * 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.protocol.WsMessage.prototype.getRequest = function() { return /** @type {boolean} */ (jspb.Message.getFieldProto3(this, 2, false)); }; /** @param {boolean} value */ proto.protocol.WsMessage.prototype.setRequest = function(value) { jspb.Message.setField(this, 2, value); }; /** * optional int64 sequence = 3; * @return {number} */ proto.protocol.WsMessage.prototype.getSequence = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); }; /** @param {number} value */ proto.protocol.WsMessage.prototype.setSequence = function(value) { jspb.Message.setField(this, 3, value); }; /** * optional bytes data = 4; * @return {!(string|Uint8Array)} */ proto.protocol.WsMessage.prototype.getData = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 4, "")); }; /** * optional bytes data = 4; * This is a type-conversion wrapper around `getData()` * @return {string} */ proto.protocol.WsMessage.prototype.getData_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getData())); }; /** * optional bytes data = 4; * 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.protocol.WsMessage.prototype.getData_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getData())); }; /** @param {!(string|Uint8Array)} value */ proto.protocol.WsMessage.prototype.setData = function(value) { jspb.Message.setField(this, 4, 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.protocol.Ping = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.Ping, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.Ping.displayName = 'proto.protocol.Ping'; } 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.protocol.Ping.prototype.toObject = function(opt_includeInstance) { return proto.protocol.Ping.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.protocol.Ping} msg The msg instance to transform. * @return {!Object} */ proto.protocol.Ping.toObject = function(includeInstance, msg) { var f, obj = { nonce: msg.getNonce() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.Ping} */ proto.protocol.Ping.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.Ping; return proto.protocol.Ping.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.Ping} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.Ping} */ proto.protocol.Ping.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setNonce(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.protocol.Ping} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.Ping.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.Ping.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.protocol.Ping.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getNonce(); if (f !== 0) { writer.writeInt64( 1, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.protocol.Ping} The clone. */ proto.protocol.Ping.prototype.cloneMessage = function() { return /** @type {!proto.protocol.Ping} */ (jspb.Message.cloneMessage(this)); }; /** * optional int64 nonce = 1; * @return {number} */ proto.protocol.Ping.prototype.getNonce = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.protocol.Ping.prototype.setNonce = 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.protocol.Pong = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.Pong, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.Pong.displayName = 'proto.protocol.Pong'; } 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.protocol.Pong.prototype.toObject = function(opt_includeInstance) { return proto.protocol.Pong.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.protocol.Pong} msg The msg instance to transform. * @return {!Object} */ proto.protocol.Pong.toObject = function(includeInstance, msg) { var f, obj = { nonce: msg.getNonce() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.protocol.Pong} */ proto.protocol.Pong.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.Pong; return proto.protocol.Pong.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.Pong} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.Pong} */ proto.protocol.Pong.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt64()); msg.setNonce(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.protocol.Pong} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.Pong.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.Pong.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.protocol.Pong.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getNonce(); if (f !== 0) { writer.writeInt64( 1, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.protocol.Pong} The clone. */ proto.protocol.Pong.prototype.cloneMessage = function() { return /** @type {!proto.protocol.Pong} */ (jspb.Message.cloneMessage(this)); }; /** * optional int64 nonce = 1; * @return {number} */ proto.protocol.Pong.prototype.getNonce = function() { return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); }; /** @param {number} value */ proto.protocol.Pong.prototype.setNonce = 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.protocol.NewKey = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.protocol.NewKey.repeatedFields_, null); }; goog.inherits(proto.protocol.NewKey, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.NewKey.displayName = 'proto.protocol.NewKey'; } /** * List of repeated fields within this message type. * @private {!Array<number>} * @const */ proto.protocol.NewKey.repeatedFields_ = [1]; 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.protocol.NewKey.prototype.toObject = function(opt_includeInstance) { return proto.protocol.NewKey.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.protocol.NewKey} msg The msg instance to transform. * @return {!Object} */ proto.protocol.NewKey.toObject = function(includeInstance, msg) { var f, obj = { keyList: msg.getKeyList_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.protocol.NewKey} */ proto.protocol.NewKey.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.NewKey; return proto.protocol.NewKey.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.NewKey} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.NewKey} */ proto.protocol.NewKey.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.getKeyList().push(value); msg.setKeyList(msg.getKeyList()); 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.protocol.NewKey} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.NewKey.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.NewKey.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.protocol.NewKey.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getKeyList_asU8(); if (f.length > 0) { writer.writeRepeatedBytes( 1, f ); } }; /** * Creates a deep clone of this proto. No data is shared with the original. * @return {!proto.protocol.NewKey} The clone. */ proto.protocol.NewKey.prototype.cloneMessage = function() { return /** @type {!proto.protocol.NewKey} */ (jspb.Message.cloneMessage(this)); }; /** * repeated bytes key = 1; * 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<!Uint8Array>|Array<string>)} */ proto.protocol.NewKey.prototype.getKeyList = function() { return /** @type {!(Array<!Uint8Array>|Array<string>)} */ (jspb.Message.getField(this, 1)); }; /** * repeated bytes key = 1; * 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. * This is a type-conversion wrapper around `getKeyList()` * @return {!Array.<string>} */ proto.protocol.NewKey.prototype.getKeyList_asB64 = function() { return /** @type {!Array.<string>} */ (jspb.Message.bytesListAsB64( this.getKeyList())); }; /** * repeated bytes key = 1; * 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. * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getKeyList()` * @return {!Array.<!Uint8Array>} */ proto.protocol.NewKey.prototype.getKeyList_asU8 = function() { return /** @type {!Array.<!Uint8Array>} */ (jspb.Message.bytesListAsU8( this.getKeyList())); }; /** @param {!(Array<!Uint8Array>|Array<string>)} value */ proto.protocol.NewKey.prototype.setKeyList = function(value) { jspb.Message.setField(this, 1, value || []); }; proto.protocol.NewKey.prototype.clearKeyList = function() { jspb.Message.setField(this, 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.protocol.ModifyKey = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.protocol.ModifyKey, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.protocol.ModifyKey.displayName = 'proto.protocol.ModifyKey'; } 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.protocol.ModifyKey.prototype.toObject = function(opt_includeInstance) { return proto.protocol.ModifyKey.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.protocol.ModifyKey} msg The msg instance to transform. * @return {!Object} */ proto.protocol.ModifyKey.toObject = function(includeInstance, msg) { var f, obj = { key: msg.getKey_asB64(), value: msg.getValue_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.protocol.ModifyKey} */ proto.protocol.ModifyKey.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.protocol.ModifyKey; return proto.protocol.ModifyKey.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.protocol.ModifyKey} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.protocol.ModifyKey} */ proto.protocol.ModifyKey.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setKey(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setValue(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.protocol.ModifyKey} message * @param {!jspb.BinaryWriter} writer */ proto.protocol.ModifyKey.serializeBinaryToWriter = function(message, writer) { message.serializeBinaryToWriter(writer); }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.protocol.ModifyKey.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.protocol.ModifyKey.prototype.serializeBinaryToWriter = function (writer) { var f = undefined; f = this.getKey_asU8(); if (f.length > 0) { writer.writeBytes( 1, f ); } f = this.getValue_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.protocol.ModifyKey} The clone. */ proto.protocol.ModifyKey.prototype.cloneMessage = function() { return /** @type {!proto.protocol.ModifyKey} */ (jspb.Message.cloneMessage(this)); }; /** * optional bytes key = 1; * @return {!(string|Uint8Array)} */ proto.protocol.ModifyKey.prototype.getKey = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 1, "")); }; /** * optional bytes key = 1; * This is a type-conversion wrapper around `getKey()` * @return {string} */ proto.protocol.ModifyKey.prototype.getKey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getKey())); }; /** * optional bytes key = 1; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getKey()` * @return {!Uint8Array} */ proto.protocol.ModifyKey.prototype.getKey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getKey())); }; /** @param {!(string|Uint8Array)} value */ proto.protocol.ModifyKey.prototype.setKey = function(value) { jspb.Message.setField(this, 1, value); }; /** * optional bytes value = 2; * @return {!(string|Uint8Array)} */ proto.protocol.ModifyKey.prototype.getValue = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldProto3(this, 2, "")); }; /** * optional bytes value = 2; * This is a type-conversion wrapper around `getValue()` * @return {string} */ proto.protocol.ModifyKey.prototype.getValue_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getValue())); }; /** * optional bytes value = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getValue()` * @return {!Uint8Array} */ proto.protocol.ModifyKey.prototype.getValue_asU8 = function()