UNPKG

@kurrent/kurrentdb-client

Version:
1,567 lines (1,383 loc) 132 kB
// source: cluster.proto /** * @fileoverview * @enhanceable * @suppress {missingRequire} reports error on implicit type usages. * @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! /* eslint-disable */ // @ts-nocheck var jspb = require('google-protobuf'); var goog = jspb; var global = (function() { if (this) { return this; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } if (typeof self !== 'undefined') { return self; } return Function('return this')(); }.call(null)); var shared_pb = require('./shared_pb.js'); goog.object.extend(proto, shared_pb); goog.exportSymbol('proto.event_store.cluster.AcceptRequest', null, global); goog.exportSymbol('proto.event_store.cluster.ClusterInfo', null, global); goog.exportSymbol('proto.event_store.cluster.EndPoint', null, global); goog.exportSymbol('proto.event_store.cluster.GossipRequest', null, global); goog.exportSymbol('proto.event_store.cluster.LeaderIsResigningOkRequest', null, global); goog.exportSymbol('proto.event_store.cluster.LeaderIsResigningRequest', null, global); goog.exportSymbol('proto.event_store.cluster.MemberInfo', null, global); goog.exportSymbol('proto.event_store.cluster.MemberInfo.VNodeState', null, global); goog.exportSymbol('proto.event_store.cluster.PrepareOkRequest', null, global); goog.exportSymbol('proto.event_store.cluster.PrepareRequest', null, global); goog.exportSymbol('proto.event_store.cluster.ProposalRequest', null, global); goog.exportSymbol('proto.event_store.cluster.ViewChangeProofRequest', null, global); goog.exportSymbol('proto.event_store.cluster.ViewChangeRequest', 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.event_store.cluster.GossipRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.GossipRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.GossipRequest.displayName = 'proto.event_store.cluster.GossipRequest'; } /** * 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.event_store.cluster.ViewChangeRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.ViewChangeRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.ViewChangeRequest.displayName = 'proto.event_store.cluster.ViewChangeRequest'; } /** * 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.event_store.cluster.ViewChangeProofRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.ViewChangeProofRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.ViewChangeProofRequest.displayName = 'proto.event_store.cluster.ViewChangeProofRequest'; } /** * 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.event_store.cluster.PrepareRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.PrepareRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.PrepareRequest.displayName = 'proto.event_store.cluster.PrepareRequest'; } /** * 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.event_store.cluster.PrepareOkRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.PrepareOkRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.PrepareOkRequest.displayName = 'proto.event_store.cluster.PrepareOkRequest'; } /** * 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.event_store.cluster.ProposalRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.ProposalRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.ProposalRequest.displayName = 'proto.event_store.cluster.ProposalRequest'; } /** * 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.event_store.cluster.AcceptRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.AcceptRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.AcceptRequest.displayName = 'proto.event_store.cluster.AcceptRequest'; } /** * 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.event_store.cluster.LeaderIsResigningRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.LeaderIsResigningRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.LeaderIsResigningRequest.displayName = 'proto.event_store.cluster.LeaderIsResigningRequest'; } /** * 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.event_store.cluster.LeaderIsResigningOkRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.LeaderIsResigningOkRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.LeaderIsResigningOkRequest.displayName = 'proto.event_store.cluster.LeaderIsResigningOkRequest'; } /** * 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.event_store.cluster.ClusterInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.event_store.cluster.ClusterInfo.repeatedFields_, null); }; goog.inherits(proto.event_store.cluster.ClusterInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.ClusterInfo.displayName = 'proto.event_store.cluster.ClusterInfo'; } /** * 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.event_store.cluster.EndPoint = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.EndPoint, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.EndPoint.displayName = 'proto.event_store.cluster.EndPoint'; } /** * 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.event_store.cluster.MemberInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.cluster.MemberInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.cluster.MemberInfo.displayName = 'proto.event_store.cluster.MemberInfo'; } if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.event_store.cluster.GossipRequest.prototype.toObject = function(opt_includeInstance) { return proto.event_store.cluster.GossipRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.event_store.cluster.GossipRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.GossipRequest.toObject = function(includeInstance, msg) { var f, obj = { info: (f = msg.getInfo()) && proto.event_store.cluster.ClusterInfo.toObject(includeInstance, f), server: (f = msg.getServer()) && proto.event_store.cluster.EndPoint.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.event_store.cluster.GossipRequest} */ proto.event_store.cluster.GossipRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.cluster.GossipRequest; return proto.event_store.cluster.GossipRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.cluster.GossipRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.cluster.GossipRequest} */ proto.event_store.cluster.GossipRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.event_store.cluster.ClusterInfo; reader.readMessage(value,proto.event_store.cluster.ClusterInfo.deserializeBinaryFromReader); msg.setInfo(value); break; case 2: var value = new proto.event_store.cluster.EndPoint; reader.readMessage(value,proto.event_store.cluster.EndPoint.deserializeBinaryFromReader); msg.setServer(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.cluster.GossipRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.cluster.GossipRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.event_store.cluster.GossipRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.GossipRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getInfo(); if (f != null) { writer.writeMessage( 1, f, proto.event_store.cluster.ClusterInfo.serializeBinaryToWriter ); } f = message.getServer(); if (f != null) { writer.writeMessage( 2, f, proto.event_store.cluster.EndPoint.serializeBinaryToWriter ); } }; /** * optional ClusterInfo info = 1; * @return {?proto.event_store.cluster.ClusterInfo} */ proto.event_store.cluster.GossipRequest.prototype.getInfo = function() { return /** @type{?proto.event_store.cluster.ClusterInfo} */ ( jspb.Message.getWrapperField(this, proto.event_store.cluster.ClusterInfo, 1)); }; /** * @param {?proto.event_store.cluster.ClusterInfo|undefined} value * @return {!proto.event_store.cluster.GossipRequest} returns this */ proto.event_store.cluster.GossipRequest.prototype.setInfo = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.GossipRequest} returns this */ proto.event_store.cluster.GossipRequest.prototype.clearInfo = function() { return this.setInfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.GossipRequest.prototype.hasInfo = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional EndPoint server = 2; * @return {?proto.event_store.cluster.EndPoint} */ proto.event_store.cluster.GossipRequest.prototype.getServer = function() { return /** @type{?proto.event_store.cluster.EndPoint} */ ( jspb.Message.getWrapperField(this, proto.event_store.cluster.EndPoint, 2)); }; /** * @param {?proto.event_store.cluster.EndPoint|undefined} value * @return {!proto.event_store.cluster.GossipRequest} returns this */ proto.event_store.cluster.GossipRequest.prototype.setServer = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.GossipRequest} returns this */ proto.event_store.cluster.GossipRequest.prototype.clearServer = function() { return this.setServer(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.GossipRequest.prototype.hasServer = function() { return jspb.Message.getField(this, 2) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.event_store.cluster.ViewChangeRequest.prototype.toObject = function(opt_includeInstance) { return proto.event_store.cluster.ViewChangeRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.event_store.cluster.ViewChangeRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.ViewChangeRequest.toObject = function(includeInstance, msg) { var f, obj = { serverId: (f = msg.getServerId()) && shared_pb.UUID.toObject(includeInstance, f), serverHttp: (f = msg.getServerHttp()) && proto.event_store.cluster.EndPoint.toObject(includeInstance, f), attemptedView: 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.event_store.cluster.ViewChangeRequest} */ proto.event_store.cluster.ViewChangeRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.cluster.ViewChangeRequest; return proto.event_store.cluster.ViewChangeRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.cluster.ViewChangeRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.cluster.ViewChangeRequest} */ proto.event_store.cluster.ViewChangeRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new shared_pb.UUID; reader.readMessage(value,shared_pb.UUID.deserializeBinaryFromReader); msg.setServerId(value); break; case 2: var value = new proto.event_store.cluster.EndPoint; reader.readMessage(value,proto.event_store.cluster.EndPoint.deserializeBinaryFromReader); msg.setServerHttp(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setAttemptedView(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.cluster.ViewChangeRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.cluster.ViewChangeRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.event_store.cluster.ViewChangeRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.ViewChangeRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getServerId(); if (f != null) { writer.writeMessage( 1, f, shared_pb.UUID.serializeBinaryToWriter ); } f = message.getServerHttp(); if (f != null) { writer.writeMessage( 2, f, proto.event_store.cluster.EndPoint.serializeBinaryToWriter ); } f = message.getAttemptedView(); if (f !== 0) { writer.writeInt32( 3, f ); } }; /** * optional event_store.client.UUID server_id = 1; * @return {?proto.event_store.client.UUID} */ proto.event_store.cluster.ViewChangeRequest.prototype.getServerId = function() { return /** @type{?proto.event_store.client.UUID} */ ( jspb.Message.getWrapperField(this, shared_pb.UUID, 1)); }; /** * @param {?proto.event_store.client.UUID|undefined} value * @return {!proto.event_store.cluster.ViewChangeRequest} returns this */ proto.event_store.cluster.ViewChangeRequest.prototype.setServerId = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.ViewChangeRequest} returns this */ proto.event_store.cluster.ViewChangeRequest.prototype.clearServerId = function() { return this.setServerId(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.ViewChangeRequest.prototype.hasServerId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional EndPoint server_http = 2; * @return {?proto.event_store.cluster.EndPoint} */ proto.event_store.cluster.ViewChangeRequest.prototype.getServerHttp = function() { return /** @type{?proto.event_store.cluster.EndPoint} */ ( jspb.Message.getWrapperField(this, proto.event_store.cluster.EndPoint, 2)); }; /** * @param {?proto.event_store.cluster.EndPoint|undefined} value * @return {!proto.event_store.cluster.ViewChangeRequest} returns this */ proto.event_store.cluster.ViewChangeRequest.prototype.setServerHttp = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.ViewChangeRequest} returns this */ proto.event_store.cluster.ViewChangeRequest.prototype.clearServerHttp = function() { return this.setServerHttp(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.ViewChangeRequest.prototype.hasServerHttp = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional int32 attempted_view = 3; * @return {number} */ proto.event_store.cluster.ViewChangeRequest.prototype.getAttemptedView = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.event_store.cluster.ViewChangeRequest} returns this */ proto.event_store.cluster.ViewChangeRequest.prototype.setAttemptedView = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.event_store.cluster.ViewChangeProofRequest.prototype.toObject = function(opt_includeInstance) { return proto.event_store.cluster.ViewChangeProofRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.event_store.cluster.ViewChangeProofRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.ViewChangeProofRequest.toObject = function(includeInstance, msg) { var f, obj = { serverId: (f = msg.getServerId()) && shared_pb.UUID.toObject(includeInstance, f), serverHttp: (f = msg.getServerHttp()) && proto.event_store.cluster.EndPoint.toObject(includeInstance, f), installedView: 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.event_store.cluster.ViewChangeProofRequest} */ proto.event_store.cluster.ViewChangeProofRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.cluster.ViewChangeProofRequest; return proto.event_store.cluster.ViewChangeProofRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.cluster.ViewChangeProofRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.cluster.ViewChangeProofRequest} */ proto.event_store.cluster.ViewChangeProofRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new shared_pb.UUID; reader.readMessage(value,shared_pb.UUID.deserializeBinaryFromReader); msg.setServerId(value); break; case 2: var value = new proto.event_store.cluster.EndPoint; reader.readMessage(value,proto.event_store.cluster.EndPoint.deserializeBinaryFromReader); msg.setServerHttp(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setInstalledView(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.cluster.ViewChangeProofRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.cluster.ViewChangeProofRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.event_store.cluster.ViewChangeProofRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.ViewChangeProofRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getServerId(); if (f != null) { writer.writeMessage( 1, f, shared_pb.UUID.serializeBinaryToWriter ); } f = message.getServerHttp(); if (f != null) { writer.writeMessage( 2, f, proto.event_store.cluster.EndPoint.serializeBinaryToWriter ); } f = message.getInstalledView(); if (f !== 0) { writer.writeInt32( 3, f ); } }; /** * optional event_store.client.UUID server_id = 1; * @return {?proto.event_store.client.UUID} */ proto.event_store.cluster.ViewChangeProofRequest.prototype.getServerId = function() { return /** @type{?proto.event_store.client.UUID} */ ( jspb.Message.getWrapperField(this, shared_pb.UUID, 1)); }; /** * @param {?proto.event_store.client.UUID|undefined} value * @return {!proto.event_store.cluster.ViewChangeProofRequest} returns this */ proto.event_store.cluster.ViewChangeProofRequest.prototype.setServerId = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.ViewChangeProofRequest} returns this */ proto.event_store.cluster.ViewChangeProofRequest.prototype.clearServerId = function() { return this.setServerId(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.ViewChangeProofRequest.prototype.hasServerId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional EndPoint server_http = 2; * @return {?proto.event_store.cluster.EndPoint} */ proto.event_store.cluster.ViewChangeProofRequest.prototype.getServerHttp = function() { return /** @type{?proto.event_store.cluster.EndPoint} */ ( jspb.Message.getWrapperField(this, proto.event_store.cluster.EndPoint, 2)); }; /** * @param {?proto.event_store.cluster.EndPoint|undefined} value * @return {!proto.event_store.cluster.ViewChangeProofRequest} returns this */ proto.event_store.cluster.ViewChangeProofRequest.prototype.setServerHttp = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.ViewChangeProofRequest} returns this */ proto.event_store.cluster.ViewChangeProofRequest.prototype.clearServerHttp = function() { return this.setServerHttp(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.ViewChangeProofRequest.prototype.hasServerHttp = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional int32 installed_view = 3; * @return {number} */ proto.event_store.cluster.ViewChangeProofRequest.prototype.getInstalledView = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.event_store.cluster.ViewChangeProofRequest} returns this */ proto.event_store.cluster.ViewChangeProofRequest.prototype.setInstalledView = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.event_store.cluster.PrepareRequest.prototype.toObject = function(opt_includeInstance) { return proto.event_store.cluster.PrepareRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.event_store.cluster.PrepareRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.PrepareRequest.toObject = function(includeInstance, msg) { var f, obj = { serverId: (f = msg.getServerId()) && shared_pb.UUID.toObject(includeInstance, f), serverHttp: (f = msg.getServerHttp()) && proto.event_store.cluster.EndPoint.toObject(includeInstance, f), view: 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.event_store.cluster.PrepareRequest} */ proto.event_store.cluster.PrepareRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.cluster.PrepareRequest; return proto.event_store.cluster.PrepareRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.cluster.PrepareRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.cluster.PrepareRequest} */ proto.event_store.cluster.PrepareRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new shared_pb.UUID; reader.readMessage(value,shared_pb.UUID.deserializeBinaryFromReader); msg.setServerId(value); break; case 2: var value = new proto.event_store.cluster.EndPoint; reader.readMessage(value,proto.event_store.cluster.EndPoint.deserializeBinaryFromReader); msg.setServerHttp(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setView(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.cluster.PrepareRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.cluster.PrepareRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.event_store.cluster.PrepareRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.PrepareRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getServerId(); if (f != null) { writer.writeMessage( 1, f, shared_pb.UUID.serializeBinaryToWriter ); } f = message.getServerHttp(); if (f != null) { writer.writeMessage( 2, f, proto.event_store.cluster.EndPoint.serializeBinaryToWriter ); } f = message.getView(); if (f !== 0) { writer.writeInt32( 3, f ); } }; /** * optional event_store.client.UUID server_id = 1; * @return {?proto.event_store.client.UUID} */ proto.event_store.cluster.PrepareRequest.prototype.getServerId = function() { return /** @type{?proto.event_store.client.UUID} */ ( jspb.Message.getWrapperField(this, shared_pb.UUID, 1)); }; /** * @param {?proto.event_store.client.UUID|undefined} value * @return {!proto.event_store.cluster.PrepareRequest} returns this */ proto.event_store.cluster.PrepareRequest.prototype.setServerId = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.PrepareRequest} returns this */ proto.event_store.cluster.PrepareRequest.prototype.clearServerId = function() { return this.setServerId(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.PrepareRequest.prototype.hasServerId = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional EndPoint server_http = 2; * @return {?proto.event_store.cluster.EndPoint} */ proto.event_store.cluster.PrepareRequest.prototype.getServerHttp = function() { return /** @type{?proto.event_store.cluster.EndPoint} */ ( jspb.Message.getWrapperField(this, proto.event_store.cluster.EndPoint, 2)); }; /** * @param {?proto.event_store.cluster.EndPoint|undefined} value * @return {!proto.event_store.cluster.PrepareRequest} returns this */ proto.event_store.cluster.PrepareRequest.prototype.setServerHttp = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.PrepareRequest} returns this */ proto.event_store.cluster.PrepareRequest.prototype.clearServerHttp = function() { return this.setServerHttp(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.PrepareRequest.prototype.hasServerHttp = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional int32 view = 3; * @return {number} */ proto.event_store.cluster.PrepareRequest.prototype.getView = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.event_store.cluster.PrepareRequest} returns this */ proto.event_store.cluster.PrepareRequest.prototype.setView = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. * Field names that are reserved in JavaScript and will be renamed to pb_name. * Optional fields that are not set will be set to undefined. * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. * For the list of reserved names please see: * net/proto2/compiler/js/internal/generator.cc#kKeyword. * @param {boolean=} opt_includeInstance Deprecated. whether to include the * JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @return {!Object} */ proto.event_store.cluster.PrepareOkRequest.prototype.toObject = function(opt_includeInstance) { return proto.event_store.cluster.PrepareOkRequest.toObject(opt_includeInstance, this); }; /** * Static version of the {@see toObject} method. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration * @param {!proto.event_store.cluster.PrepareOkRequest} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.PrepareOkRequest.toObject = function(includeInstance, msg) { var f, obj = { view: jspb.Message.getFieldWithDefault(msg, 1, 0), serverId: (f = msg.getServerId()) && shared_pb.UUID.toObject(includeInstance, f), serverHttp: (f = msg.getServerHttp()) && proto.event_store.cluster.EndPoint.toObject(includeInstance, f), epochNumber: jspb.Message.getFieldWithDefault(msg, 4, 0), epochPosition: jspb.Message.getFieldWithDefault(msg, 5, "0"), epochId: (f = msg.getEpochId()) && shared_pb.UUID.toObject(includeInstance, f), epochLeaderInstanceId: (f = msg.getEpochLeaderInstanceId()) && shared_pb.UUID.toObject(includeInstance, f), lastCommitPosition: jspb.Message.getFieldWithDefault(msg, 8, "0"), writerCheckpoint: jspb.Message.getFieldWithDefault(msg, 9, "0"), chaserCheckpoint: jspb.Message.getFieldWithDefault(msg, 10, "0"), nodePriority: jspb.Message.getFieldWithDefault(msg, 11, 0), clusterInfo: (f = msg.getClusterInfo()) && proto.event_store.cluster.ClusterInfo.toObject(includeInstance, f) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.event_store.cluster.PrepareOkRequest} */ proto.event_store.cluster.PrepareOkRequest.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.cluster.PrepareOkRequest; return proto.event_store.cluster.PrepareOkRequest.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.cluster.PrepareOkRequest} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.cluster.PrepareOkRequest} */ proto.event_store.cluster.PrepareOkRequest.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readInt32()); msg.setView(value); break; case 2: var value = new shared_pb.UUID; reader.readMessage(value,shared_pb.UUID.deserializeBinaryFromReader); msg.setServerId(value); break; case 3: var value = new proto.event_store.cluster.EndPoint; reader.readMessage(value,proto.event_store.cluster.EndPoint.deserializeBinaryFromReader); msg.setServerHttp(value); break; case 4: var value = /** @type {number} */ (reader.readInt32()); msg.setEpochNumber(value); break; case 5: var value = /** @type {string} */ (reader.readInt64String()); msg.setEpochPosition(value); break; case 6: var value = new shared_pb.UUID; reader.readMessage(value,shared_pb.UUID.deserializeBinaryFromReader); msg.setEpochId(value); break; case 7: var value = new shared_pb.UUID; reader.readMessage(value,shared_pb.UUID.deserializeBinaryFromReader); msg.setEpochLeaderInstanceId(value); break; case 8: var value = /** @type {string} */ (reader.readInt64String()); msg.setLastCommitPosition(value); break; case 9: var value = /** @type {string} */ (reader.readInt64String()); msg.setWriterCheckpoint(value); break; case 10: var value = /** @type {string} */ (reader.readInt64String()); msg.setChaserCheckpoint(value); break; case 11: var value = /** @type {number} */ (reader.readInt32()); msg.setNodePriority(value); break; case 12: var value = new proto.event_store.cluster.ClusterInfo; reader.readMessage(value,proto.event_store.cluster.ClusterInfo.deserializeBinaryFromReader); msg.setClusterInfo(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.cluster.PrepareOkRequest.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.cluster.PrepareOkRequest.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.event_store.cluster.PrepareOkRequest} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.cluster.PrepareOkRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getView(); if (f !== 0) { writer.writeInt32( 1, f ); } f = message.getServerId(); if (f != null) { writer.writeMessage( 2, f, shared_pb.UUID.serializeBinaryToWriter ); } f = message.getServerHttp(); if (f != null) { writer.writeMessage( 3, f, proto.event_store.cluster.EndPoint.serializeBinaryToWriter ); } f = message.getEpochNumber(); if (f !== 0) { writer.writeInt32( 4, f ); } f = message.getEpochPosition(); if (parseInt(f, 10) !== 0) { writer.writeInt64String( 5, f ); } f = message.getEpochId(); if (f != null) { writer.writeMessage( 6, f, shared_pb.UUID.serializeBinaryToWriter ); } f = message.getEpochLeaderInstanceId(); if (f != null) { writer.writeMessage( 7, f, shared_pb.UUID.serializeBinaryToWriter ); } f = message.getLastCommitPosition(); if (parseInt(f, 10) !== 0) { writer.writeInt64String( 8, f ); } f = message.getWriterCheckpoint(); if (parseInt(f, 10) !== 0) { writer.writeInt64String( 9, f ); } f = message.getChaserCheckpoint(); if (parseInt(f, 10) !== 0) { writer.writeInt64String( 10, f ); } f = message.getNodePriority(); if (f !== 0) { writer.writeInt32( 11, f ); } f = message.getClusterInfo(); if (f != null) { writer.writeMessage( 12, f, proto.event_store.cluster.ClusterInfo.serializeBinaryToWriter ); } }; /** * optional int32 view = 1; * @return {number} */ proto.event_store.cluster.PrepareOkRequest.prototype.getView = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.event_store.cluster.PrepareOkRequest} returns this */ proto.event_store.cluster.PrepareOkRequest.prototype.setView = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional event_store.client.UUID server_id = 2; * @return {?proto.event_store.client.UUID} */ proto.event_store.cluster.PrepareOkRequest.prototype.getServerId = function() { return /** @type{?proto.event_store.client.UUID} */ ( jspb.Message.getWrapperField(this, shared_pb.UUID, 2)); }; /** * @param {?proto.event_store.client.UUID|undefined} value * @return {!proto.event_store.cluster.PrepareOkRequest} returns this */ proto.event_store.cluster.PrepareOkRequest.prototype.setServerId = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.PrepareOkRequest} returns this */ proto.event_store.cluster.PrepareOkRequest.prototype.clearServerId = function() { return this.setServerId(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.PrepareOkRequest.prototype.hasServerId = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional EndPoint server_http = 3; * @return {?proto.event_store.cluster.EndPoint} */ proto.event_store.cluster.PrepareOkRequest.prototype.getServerHttp = function() { return /** @type{?proto.event_store.cluster.EndPoint} */ ( jspb.Message.getWrapperField(this, proto.event_store.cluster.EndPoint, 3)); }; /** * @param {?proto.event_store.cluster.EndPoint|undefined} value * @return {!proto.event_store.cluster.PrepareOkRequest} returns this */ proto.event_store.cluster.PrepareOkRequest.prototype.setServerHttp = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.cluster.PrepareOkRequest} returns this */ proto.event_store.cluster.PrepareOkRequest.prototype.clearServerHttp = function() { return this.setServerHttp(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.cluster.PrepareOkRequest.prototype.hasServerHttp = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional int32 epoch_number = 4; * @return {number} */ proto.event_store.cluster.PrepareOkRequest.prototype.getEpochNumber = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.event_store.cluster.PrepareOkRequest} returns this */ proto.event_store.cluster.PrepareOkRequest.prototype.setEpochNumber = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * optional int64 epoch_position = 5; * @return {string} */ proto.event_store.cluster.PrepareOkRequest.prototype.getEpochPosition = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "0")); }; /** * @param {string} value * @return {!proto.event_store.cluster.PrepareOkRequest} returns this */ proto.event_store.cluster.PrepareOkRequest.prototype.setEpochPosition = function(value) { return jspb.Message.setProto3StringIntField(