/** * @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')(); var commonpb_pb = require('./commonpb_pb.js'); goog.exportSymbol('proto.bayard.index.BulkDeleteReply', null, global); goog.exportSymbol('proto.bayard.index.BulkDeleteReq', null, global); goog.exportSymbol('proto.bayard.index.BulkSetReply', null, global); goog.exportSymbol('proto.bayard.index.BulkSetReq', null, global); goog.exportSymbol('proto.bayard.index.CommitReply', null, global); goog.exportSymbol('proto.bayard.index.CommitReq', null, global); goog.exportSymbol('proto.bayard.index.DeleteReply', null, global); goog.exportSymbol('proto.bayard.index.DeleteReq', null, global); goog.exportSymbol('proto.bayard.index.GetReply', null, global); goog.exportSymbol('proto.bayard.index.GetReq', null, global); goog.exportSymbol('proto.bayard.index.MergeReply', null, global); goog.exportSymbol('proto.bayard.index.MergeReq', null, global); goog.exportSymbol('proto.bayard.index.RollbackReply', null, global); goog.exportSymbol('proto.bayard.index.RollbackReq', null, global); goog.exportSymbol('proto.bayard.index.SchemaReply', null, global); goog.exportSymbol('proto.bayard.index.SchemaReq', null, global); goog.exportSymbol('proto.bayard.index.SearchReply', null, global); goog.exportSymbol('proto.bayard.index.SearchReq', null, global); goog.exportSymbol('proto.bayard.index.SetReply', null, global); goog.exportSymbol('proto.bayard.index.SetReq', null, global); goog.exportSymbol('proto.bayard.index.StatusReply', null, global); goog.exportSymbol('proto.bayard.index.StatusReq', 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.bayard.index.SearchReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.bayard.index.SearchReq.repeatedFields_, null); }; goog.inherits(proto.bayard.index.SearchReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.SearchReq.displayName = 'proto.bayard.index.SearchReq'; } /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.bayard.index.SearchReq.repeatedFields_ = [7]; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.SearchReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.SearchReq.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.bayard.index.SearchReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SearchReq.toObject = function(includeInstance, msg) { var f, obj = { query: jspb.Message.getFieldWithDefault(msg, 1, ""), from: jspb.Message.getFieldWithDefault(msg, 2, 0), limit: jspb.Message.getFieldWithDefault(msg, 3, 0), excludeCount: jspb.Message.getFieldWithDefault(msg, 4, false), excludeDocs: jspb.Message.getFieldWithDefault(msg, 5, false), facetField: jspb.Message.getFieldWithDefault(msg, 6, ""), facetPrefixesList: jspb.Message.getRepeatedField(msg, 7), clientId: jspb.Message.getFieldWithDefault(msg, 8, 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.bayard.index.SearchReq} */ proto.bayard.index.SearchReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.SearchReq; return proto.bayard.index.SearchReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.SearchReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.SearchReq} */ proto.bayard.index.SearchReq.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.setQuery(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setFrom(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setLimit(value); break; case 4: var value = /** @type {boolean} */ (reader.readBool()); msg.setExcludeCount(value); break; case 5: var value = /** @type {boolean} */ (reader.readBool()); msg.setExcludeDocs(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setFacetField(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.addFacetPrefixes(value); break; case 8: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.SearchReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.SearchReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.SearchReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SearchReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getQuery(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getFrom(); if (f !== 0) { writer.writeUint64( 2, f ); } f = message.getLimit(); if (f !== 0) { writer.writeUint64( 3, f ); } f = message.getExcludeCount(); if (f) { writer.writeBool( 4, f ); } f = message.getExcludeDocs(); if (f) { writer.writeBool( 5, f ); } f = message.getFacetField(); if (f.length > 0) { writer.writeString( 6, f ); } f = message.getFacetPrefixesList(); if (f.length > 0) { writer.writeRepeatedString( 7, f ); } f = message.getClientId(); if (f !== 0) { writer.writeUint64( 8, f ); } }; /** * optional string query = 1; * @return {string} */ proto.bayard.index.SearchReq.prototype.getQuery = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.bayard.index.SearchReq.prototype.setQuery = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional uint64 from = 2; * @return {number} */ proto.bayard.index.SearchReq.prototype.getFrom = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ proto.bayard.index.SearchReq.prototype.setFrom = function(value) { jspb.Message.setProto3IntField(this, 2, value); }; /** * optional uint64 limit = 3; * @return {number} */ proto.bayard.index.SearchReq.prototype.getLimit = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ proto.bayard.index.SearchReq.prototype.setLimit = function(value) { jspb.Message.setProto3IntField(this, 3, value); }; /** * optional bool exclude_count = 4; * 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.bayard.index.SearchReq.prototype.getExcludeCount = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 4, false)); }; /** @param {boolean} value */ proto.bayard.index.SearchReq.prototype.setExcludeCount = function(value) { jspb.Message.setProto3BooleanField(this, 4, value); }; /** * optional bool exclude_docs = 5; * 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.bayard.index.SearchReq.prototype.getExcludeDocs = function() { return /** @type {boolean} */ (jspb.Message.getFieldWithDefault(this, 5, false)); }; /** @param {boolean} value */ proto.bayard.index.SearchReq.prototype.setExcludeDocs = function(value) { jspb.Message.setProto3BooleanField(this, 5, value); }; /** * optional string facet_field = 6; * @return {string} */ proto.bayard.index.SearchReq.prototype.getFacetField = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** @param {string} value */ proto.bayard.index.SearchReq.prototype.setFacetField = function(value) { jspb.Message.setProto3StringField(this, 6, value); }; /** * repeated string facet_prefixes = 7; * @return {!Array} */ proto.bayard.index.SearchReq.prototype.getFacetPrefixesList = function() { return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 7)); }; /** @param {!Array} value */ proto.bayard.index.SearchReq.prototype.setFacetPrefixesList = function(value) { jspb.Message.setField(this, 7, value || []); }; /** * @param {!string} value * @param {number=} opt_index */ proto.bayard.index.SearchReq.prototype.addFacetPrefixes = function(value, opt_index) { jspb.Message.addToRepeatedField(this, 7, value, opt_index); }; proto.bayard.index.SearchReq.prototype.clearFacetPrefixesList = function() { this.setFacetPrefixesList([]); }; /** * optional uint64 client_id = 8; * @return {number} */ proto.bayard.index.SearchReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** @param {number} value */ proto.bayard.index.SearchReq.prototype.setClientId = function(value) { jspb.Message.setProto3IntField(this, 8, 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.bayard.index.SearchReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.SearchReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.SearchReply.displayName = 'proto.bayard.index.SearchReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.SearchReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.SearchReply.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.bayard.index.SearchReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SearchReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), searchResult: jspb.Message.getFieldWithDefault(msg, 2, ""), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 4, 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.bayard.index.SearchReply} */ proto.bayard.index.SearchReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.SearchReply; return proto.bayard.index.SearchReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.SearchReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.SearchReply} */ proto.bayard.index.SearchReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setSearchResult(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 4: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.SearchReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.SearchReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.SearchReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SearchReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getSearchResult(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 4, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.SearchReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.SearchReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional string search_result = 2; * @return {string} */ proto.bayard.index.SearchReply.prototype.getSearchResult = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.bayard.index.SearchReply.prototype.setSearchResult = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional bytes address_map = 3; * @return {string} */ proto.bayard.index.SearchReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * optional bytes address_map = 3; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.SearchReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.SearchReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.SearchReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 3, value); }; /** * optional uint64 leader_id = 4; * @return {number} */ proto.bayard.index.SearchReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ proto.bayard.index.SearchReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.GetReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.GetReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.GetReq.displayName = 'proto.bayard.index.GetReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.GetReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.GetReq.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.bayard.index.GetReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.GetReq.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), clientId: 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.bayard.index.GetReq} */ proto.bayard.index.GetReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.GetReq; return proto.bayard.index.GetReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.GetReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.GetReq} */ proto.bayard.index.GetReq.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.setId(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.GetReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.GetReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.GetReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.GetReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getClientId(); if (f !== 0) { writer.writeUint64( 2, f ); } }; /** * optional string id = 1; * @return {string} */ proto.bayard.index.GetReq.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.bayard.index.GetReq.prototype.setId = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional uint64 client_id = 2; * @return {number} */ proto.bayard.index.GetReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ proto.bayard.index.GetReq.prototype.setClientId = 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.bayard.index.GetReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.GetReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.GetReply.displayName = 'proto.bayard.index.GetReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.GetReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.GetReply.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.bayard.index.GetReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.GetReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), doc: jspb.Message.getFieldWithDefault(msg, 2, ""), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 4, 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.bayard.index.GetReply} */ proto.bayard.index.GetReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.GetReply; return proto.bayard.index.GetReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.GetReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.GetReply} */ proto.bayard.index.GetReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setDoc(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 4: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.GetReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.GetReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.GetReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.GetReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getDoc(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 4, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.GetReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.GetReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional string doc = 2; * @return {string} */ proto.bayard.index.GetReply.prototype.getDoc = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.bayard.index.GetReply.prototype.setDoc = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional bytes address_map = 3; * @return {string} */ proto.bayard.index.GetReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * optional bytes address_map = 3; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.GetReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.GetReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.GetReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 3, value); }; /** * optional uint64 leader_id = 4; * @return {number} */ proto.bayard.index.GetReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ proto.bayard.index.GetReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.SetReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.SetReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.SetReq.displayName = 'proto.bayard.index.SetReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.SetReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.SetReq.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.bayard.index.SetReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SetReq.toObject = function(includeInstance, msg) { var f, obj = { doc: jspb.Message.getFieldWithDefault(msg, 1, ""), clientId: 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.bayard.index.SetReq} */ proto.bayard.index.SetReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.SetReq; return proto.bayard.index.SetReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.SetReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.SetReq} */ proto.bayard.index.SetReq.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.setDoc(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.SetReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.SetReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.SetReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SetReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDoc(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getClientId(); if (f !== 0) { writer.writeUint64( 2, f ); } }; /** * optional string doc = 1; * @return {string} */ proto.bayard.index.SetReq.prototype.getDoc = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.bayard.index.SetReq.prototype.setDoc = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional uint64 client_id = 2; * @return {number} */ proto.bayard.index.SetReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ proto.bayard.index.SetReq.prototype.setClientId = 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.bayard.index.SetReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.SetReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.SetReply.displayName = 'proto.bayard.index.SetReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.SetReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.SetReply.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.bayard.index.SetReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SetReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bayard.index.SetReply} */ proto.bayard.index.SetReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.SetReply; return proto.bayard.index.SetReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.SetReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.SetReply} */ proto.bayard.index.SetReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.SetReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.SetReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.SetReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SetReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 3, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.SetReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.SetReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional bytes address_map = 2; * @return {string} */ proto.bayard.index.SetReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes address_map = 2; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.SetReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.SetReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.SetReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional uint64 leader_id = 3; * @return {number} */ proto.bayard.index.SetReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ proto.bayard.index.SetReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.DeleteReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.DeleteReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.DeleteReq.displayName = 'proto.bayard.index.DeleteReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.DeleteReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.DeleteReq.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.bayard.index.DeleteReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.DeleteReq.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), clientId: 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.bayard.index.DeleteReq} */ proto.bayard.index.DeleteReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.DeleteReq; return proto.bayard.index.DeleteReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.DeleteReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.DeleteReq} */ proto.bayard.index.DeleteReq.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.setId(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.DeleteReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.DeleteReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.DeleteReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.DeleteReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getClientId(); if (f !== 0) { writer.writeUint64( 2, f ); } }; /** * optional string id = 1; * @return {string} */ proto.bayard.index.DeleteReq.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.bayard.index.DeleteReq.prototype.setId = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional uint64 client_id = 2; * @return {number} */ proto.bayard.index.DeleteReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ proto.bayard.index.DeleteReq.prototype.setClientId = 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.bayard.index.DeleteReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.DeleteReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.DeleteReply.displayName = 'proto.bayard.index.DeleteReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.DeleteReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.DeleteReply.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.bayard.index.DeleteReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.DeleteReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bayard.index.DeleteReply} */ proto.bayard.index.DeleteReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.DeleteReply; return proto.bayard.index.DeleteReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.DeleteReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.DeleteReply} */ proto.bayard.index.DeleteReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.DeleteReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.DeleteReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.DeleteReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.DeleteReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 3, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.DeleteReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.DeleteReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional bytes address_map = 2; * @return {string} */ proto.bayard.index.DeleteReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes address_map = 2; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.DeleteReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.DeleteReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.DeleteReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional uint64 leader_id = 3; * @return {number} */ proto.bayard.index.DeleteReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ proto.bayard.index.DeleteReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.BulkSetReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.BulkSetReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.BulkSetReq.displayName = 'proto.bayard.index.BulkSetReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.BulkSetReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.BulkSetReq.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.bayard.index.BulkSetReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.BulkSetReq.toObject = function(includeInstance, msg) { var f, obj = { docs: jspb.Message.getFieldWithDefault(msg, 1, ""), clientId: 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.bayard.index.BulkSetReq} */ proto.bayard.index.BulkSetReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.BulkSetReq; return proto.bayard.index.BulkSetReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.BulkSetReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.BulkSetReq} */ proto.bayard.index.BulkSetReq.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.setDocs(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.BulkSetReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.BulkSetReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.BulkSetReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.BulkSetReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDocs(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getClientId(); if (f !== 0) { writer.writeUint64( 2, f ); } }; /** * optional string docs = 1; * @return {string} */ proto.bayard.index.BulkSetReq.prototype.getDocs = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.bayard.index.BulkSetReq.prototype.setDocs = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional uint64 client_id = 2; * @return {number} */ proto.bayard.index.BulkSetReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ proto.bayard.index.BulkSetReq.prototype.setClientId = 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.bayard.index.BulkSetReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.BulkSetReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.BulkSetReply.displayName = 'proto.bayard.index.BulkSetReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.BulkSetReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.BulkSetReply.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.bayard.index.BulkSetReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.BulkSetReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bayard.index.BulkSetReply} */ proto.bayard.index.BulkSetReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.BulkSetReply; return proto.bayard.index.BulkSetReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.BulkSetReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.BulkSetReply} */ proto.bayard.index.BulkSetReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.BulkSetReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.BulkSetReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.BulkSetReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.BulkSetReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 3, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.BulkSetReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.BulkSetReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional bytes address_map = 2; * @return {string} */ proto.bayard.index.BulkSetReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes address_map = 2; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.BulkSetReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.BulkSetReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.BulkSetReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional uint64 leader_id = 3; * @return {number} */ proto.bayard.index.BulkSetReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ proto.bayard.index.BulkSetReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.BulkDeleteReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.BulkDeleteReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.BulkDeleteReq.displayName = 'proto.bayard.index.BulkDeleteReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.BulkDeleteReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.BulkDeleteReq.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.bayard.index.BulkDeleteReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.BulkDeleteReq.toObject = function(includeInstance, msg) { var f, obj = { docs: jspb.Message.getFieldWithDefault(msg, 1, ""), clientId: 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.bayard.index.BulkDeleteReq} */ proto.bayard.index.BulkDeleteReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.BulkDeleteReq; return proto.bayard.index.BulkDeleteReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.BulkDeleteReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.BulkDeleteReq} */ proto.bayard.index.BulkDeleteReq.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.setDocs(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.BulkDeleteReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.BulkDeleteReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.BulkDeleteReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.BulkDeleteReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getDocs(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getClientId(); if (f !== 0) { writer.writeUint64( 2, f ); } }; /** * optional string docs = 1; * @return {string} */ proto.bayard.index.BulkDeleteReq.prototype.getDocs = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** @param {string} value */ proto.bayard.index.BulkDeleteReq.prototype.setDocs = function(value) { jspb.Message.setProto3StringField(this, 1, value); }; /** * optional uint64 client_id = 2; * @return {number} */ proto.bayard.index.BulkDeleteReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ proto.bayard.index.BulkDeleteReq.prototype.setClientId = 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.bayard.index.BulkDeleteReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.BulkDeleteReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.BulkDeleteReply.displayName = 'proto.bayard.index.BulkDeleteReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.BulkDeleteReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.BulkDeleteReply.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.bayard.index.BulkDeleteReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.BulkDeleteReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bayard.index.BulkDeleteReply} */ proto.bayard.index.BulkDeleteReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.BulkDeleteReply; return proto.bayard.index.BulkDeleteReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.BulkDeleteReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.BulkDeleteReply} */ proto.bayard.index.BulkDeleteReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.BulkDeleteReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.BulkDeleteReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.BulkDeleteReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.BulkDeleteReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 3, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.BulkDeleteReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.BulkDeleteReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional bytes address_map = 2; * @return {string} */ proto.bayard.index.BulkDeleteReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes address_map = 2; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.BulkDeleteReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.BulkDeleteReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.BulkDeleteReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional uint64 leader_id = 3; * @return {number} */ proto.bayard.index.BulkDeleteReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ proto.bayard.index.BulkDeleteReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.CommitReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.CommitReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.CommitReq.displayName = 'proto.bayard.index.CommitReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.CommitReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.CommitReq.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.bayard.index.CommitReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.CommitReq.toObject = function(includeInstance, msg) { var f, obj = { clientId: jspb.Message.getFieldWithDefault(msg, 1, 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.bayard.index.CommitReq} */ proto.bayard.index.CommitReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.CommitReq; return proto.bayard.index.CommitReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.CommitReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.CommitReq} */ proto.bayard.index.CommitReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.CommitReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.CommitReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.CommitReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.CommitReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getClientId(); if (f !== 0) { writer.writeUint64( 1, f ); } }; /** * optional uint64 client_id = 1; * @return {number} */ proto.bayard.index.CommitReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ proto.bayard.index.CommitReq.prototype.setClientId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.CommitReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.CommitReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.CommitReply.displayName = 'proto.bayard.index.CommitReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.CommitReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.CommitReply.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.bayard.index.CommitReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.CommitReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bayard.index.CommitReply} */ proto.bayard.index.CommitReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.CommitReply; return proto.bayard.index.CommitReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.CommitReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.CommitReply} */ proto.bayard.index.CommitReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.CommitReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.CommitReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.CommitReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.CommitReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 3, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.CommitReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.CommitReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional bytes address_map = 2; * @return {string} */ proto.bayard.index.CommitReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes address_map = 2; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.CommitReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.CommitReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.CommitReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional uint64 leader_id = 3; * @return {number} */ proto.bayard.index.CommitReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ proto.bayard.index.CommitReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.RollbackReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.RollbackReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.RollbackReq.displayName = 'proto.bayard.index.RollbackReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.RollbackReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.RollbackReq.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.bayard.index.RollbackReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.RollbackReq.toObject = function(includeInstance, msg) { var f, obj = { clientId: jspb.Message.getFieldWithDefault(msg, 1, 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.bayard.index.RollbackReq} */ proto.bayard.index.RollbackReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.RollbackReq; return proto.bayard.index.RollbackReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.RollbackReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.RollbackReq} */ proto.bayard.index.RollbackReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.RollbackReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.RollbackReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.RollbackReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.RollbackReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getClientId(); if (f !== 0) { writer.writeUint64( 1, f ); } }; /** * optional uint64 client_id = 1; * @return {number} */ proto.bayard.index.RollbackReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ proto.bayard.index.RollbackReq.prototype.setClientId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.RollbackReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.RollbackReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.RollbackReply.displayName = 'proto.bayard.index.RollbackReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.RollbackReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.RollbackReply.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.bayard.index.RollbackReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.RollbackReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bayard.index.RollbackReply} */ proto.bayard.index.RollbackReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.RollbackReply; return proto.bayard.index.RollbackReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.RollbackReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.RollbackReply} */ proto.bayard.index.RollbackReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.RollbackReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.RollbackReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.RollbackReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.RollbackReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 3, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.RollbackReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.RollbackReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional bytes address_map = 2; * @return {string} */ proto.bayard.index.RollbackReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes address_map = 2; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.RollbackReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.RollbackReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.RollbackReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional uint64 leader_id = 3; * @return {number} */ proto.bayard.index.RollbackReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ proto.bayard.index.RollbackReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.MergeReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.MergeReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.MergeReq.displayName = 'proto.bayard.index.MergeReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.MergeReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.MergeReq.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.bayard.index.MergeReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.MergeReq.toObject = function(includeInstance, msg) { var f, obj = { clientId: jspb.Message.getFieldWithDefault(msg, 1, 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.bayard.index.MergeReq} */ proto.bayard.index.MergeReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.MergeReq; return proto.bayard.index.MergeReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.MergeReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.MergeReq} */ proto.bayard.index.MergeReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.MergeReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.MergeReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.MergeReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.MergeReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getClientId(); if (f !== 0) { writer.writeUint64( 1, f ); } }; /** * optional uint64 client_id = 1; * @return {number} */ proto.bayard.index.MergeReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ proto.bayard.index.MergeReq.prototype.setClientId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.MergeReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.MergeReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.MergeReply.displayName = 'proto.bayard.index.MergeReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.MergeReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.MergeReply.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.bayard.index.MergeReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.MergeReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bayard.index.MergeReply} */ proto.bayard.index.MergeReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.MergeReply; return proto.bayard.index.MergeReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.MergeReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.MergeReply} */ proto.bayard.index.MergeReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.MergeReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.MergeReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.MergeReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.MergeReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 2, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 3, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.MergeReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.MergeReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional bytes address_map = 2; * @return {string} */ proto.bayard.index.MergeReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * optional bytes address_map = 2; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.MergeReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 2; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.MergeReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.MergeReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 2, value); }; /** * optional uint64 leader_id = 3; * @return {number} */ proto.bayard.index.MergeReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** @param {number} value */ proto.bayard.index.MergeReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.SchemaReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.SchemaReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.SchemaReq.displayName = 'proto.bayard.index.SchemaReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.SchemaReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.SchemaReq.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.bayard.index.SchemaReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SchemaReq.toObject = function(includeInstance, msg) { var f, obj = { clientId: jspb.Message.getFieldWithDefault(msg, 1, 0), seq: 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.bayard.index.SchemaReq} */ proto.bayard.index.SchemaReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.SchemaReq; return proto.bayard.index.SchemaReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.SchemaReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.SchemaReq} */ proto.bayard.index.SchemaReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setSeq(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.SchemaReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.SchemaReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.SchemaReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SchemaReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getClientId(); if (f !== 0) { writer.writeUint64( 1, f ); } f = message.getSeq(); if (f !== 0) { writer.writeUint64( 2, f ); } }; /** * optional uint64 client_id = 1; * @return {number} */ proto.bayard.index.SchemaReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ proto.bayard.index.SchemaReq.prototype.setClientId = function(value) { jspb.Message.setProto3IntField(this, 1, value); }; /** * optional uint64 seq = 2; * @return {number} */ proto.bayard.index.SchemaReq.prototype.getSeq = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** @param {number} value */ proto.bayard.index.SchemaReq.prototype.setSeq = 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.bayard.index.SchemaReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.SchemaReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.SchemaReply.displayName = 'proto.bayard.index.SchemaReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.SchemaReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.SchemaReply.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.bayard.index.SchemaReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SchemaReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), schema: jspb.Message.getFieldWithDefault(msg, 2, ""), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 4, 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.bayard.index.SchemaReply} */ proto.bayard.index.SchemaReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.SchemaReply; return proto.bayard.index.SchemaReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.SchemaReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.SchemaReply} */ proto.bayard.index.SchemaReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setSchema(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 4: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.SchemaReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.SchemaReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.SchemaReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.SchemaReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getSchema(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 4, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.SchemaReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.SchemaReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional string schema = 2; * @return {string} */ proto.bayard.index.SchemaReply.prototype.getSchema = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.bayard.index.SchemaReply.prototype.setSchema = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional bytes address_map = 3; * @return {string} */ proto.bayard.index.SchemaReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * optional bytes address_map = 3; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.SchemaReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.SchemaReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.SchemaReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 3, value); }; /** * optional uint64 leader_id = 4; * @return {number} */ proto.bayard.index.SchemaReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ proto.bayard.index.SchemaReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.StatusReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.StatusReq, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.StatusReq.displayName = 'proto.bayard.index.StatusReq'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.StatusReq.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.StatusReq.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.bayard.index.StatusReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.StatusReq.toObject = function(includeInstance, msg) { var f, obj = { clientId: jspb.Message.getFieldWithDefault(msg, 1, 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.bayard.index.StatusReq} */ proto.bayard.index.StatusReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.StatusReq; return proto.bayard.index.StatusReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.StatusReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.StatusReq} */ proto.bayard.index.StatusReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setClientId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.StatusReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.StatusReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.StatusReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.StatusReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getClientId(); if (f !== 0) { writer.writeUint64( 1, f ); } }; /** * optional uint64 client_id = 1; * @return {number} */ proto.bayard.index.StatusReq.prototype.getClientId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {number} value */ proto.bayard.index.StatusReq.prototype.setClientId = function(value) { jspb.Message.setProto3IntField(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.bayard.index.StatusReply = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bayard.index.StatusReply, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.bayard.index.StatusReply.displayName = 'proto.bayard.index.StatusReply'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto suitable for use in Soy templates. * Field names that are reserved in JavaScript and will be renamed to pb_name. * To access a reserved field use, foo.pb_, eg, foo.pb_default. * For the list of reserved names please see: * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. * @param {boolean=} opt_includeInstance Whether to include the JSPB instance * for transitional soy proto support: http://goto/soy-param-migration * @return {!Object} */ proto.bayard.index.StatusReply.prototype.toObject = function(opt_includeInstance) { return proto.bayard.index.StatusReply.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.bayard.index.StatusReply} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.StatusReply.toObject = function(includeInstance, msg) { var f, obj = { state: jspb.Message.getFieldWithDefault(msg, 1, 0), status: jspb.Message.getFieldWithDefault(msg, 2, ""), addressMap: msg.getAddressMap_asB64(), leaderId: jspb.Message.getFieldWithDefault(msg, 4, 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.bayard.index.StatusReply} */ proto.bayard.index.StatusReply.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.bayard.index.StatusReply; return proto.bayard.index.StatusReply.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.bayard.index.StatusReply} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bayard.index.StatusReply} */ proto.bayard.index.StatusReply.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.bayard.common.State} */ (reader.readEnum()); msg.setState(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setStatus(value); break; case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setAddressMap(value); break; case 4: var value = /** @type {number} */ (reader.readUint64()); msg.setLeaderId(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.bayard.index.StatusReply.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.bayard.index.StatusReply.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.bayard.index.StatusReply} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.bayard.index.StatusReply.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getState(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getStatus(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getAddressMap_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } f = message.getLeaderId(); if (f !== 0) { writer.writeUint64( 4, f ); } }; /** * optional bayard.common.State state = 1; * @return {!proto.bayard.common.State} */ proto.bayard.index.StatusReply.prototype.getState = function() { return /** @type {!proto.bayard.common.State} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** @param {!proto.bayard.common.State} value */ proto.bayard.index.StatusReply.prototype.setState = function(value) { jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional string status = 2; * @return {string} */ proto.bayard.index.StatusReply.prototype.getStatus = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** @param {string} value */ proto.bayard.index.StatusReply.prototype.setStatus = function(value) { jspb.Message.setProto3StringField(this, 2, value); }; /** * optional bytes address_map = 3; * @return {string} */ proto.bayard.index.StatusReply.prototype.getAddressMap = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * optional bytes address_map = 3; * This is a type-conversion wrapper around `getAddressMap()` * @return {string} */ proto.bayard.index.StatusReply.prototype.getAddressMap_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getAddressMap())); }; /** * optional bytes address_map = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getAddressMap()` * @return {!Uint8Array} */ proto.bayard.index.StatusReply.prototype.getAddressMap_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getAddressMap())); }; /** @param {!(string|Uint8Array)} value */ proto.bayard.index.StatusReply.prototype.setAddressMap = function(value) { jspb.Message.setProto3BytesField(this, 3, value); }; /** * optional uint64 leader_id = 4; * @return {number} */ proto.bayard.index.StatusReply.prototype.getLeaderId = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** @param {number} value */ proto.bayard.index.StatusReply.prototype.setLeaderId = function(value) { jspb.Message.setProto3IntField(this, 4, value); }; goog.object.extend(exports, proto.bayard.index);