UNPKG

@kurrent/kurrentdb-client

Version:
1,508 lines (1,325 loc) 77.5 kB
// source: shared.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 google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); goog.object.extend(proto, google_protobuf_empty_pb); goog.exportSymbol('proto.event_store.client.AccessDenied', null, global); goog.exportSymbol('proto.event_store.client.AllStreamPosition', null, global); goog.exportSymbol('proto.event_store.client.BadRequest', null, global); goog.exportSymbol('proto.event_store.client.Empty', null, global); goog.exportSymbol('proto.event_store.client.InvalidTransaction', null, global); goog.exportSymbol('proto.event_store.client.MaximumAppendSizeExceeded', null, global); goog.exportSymbol('proto.event_store.client.StreamDeleted', null, global); goog.exportSymbol('proto.event_store.client.StreamIdentifier', null, global); goog.exportSymbol('proto.event_store.client.Timeout', null, global); goog.exportSymbol('proto.event_store.client.UUID', null, global); goog.exportSymbol('proto.event_store.client.UUID.Structured', null, global); goog.exportSymbol('proto.event_store.client.UUID.ValueCase', null, global); goog.exportSymbol('proto.event_store.client.Unknown', null, global); goog.exportSymbol('proto.event_store.client.WrongExpectedVersion', null, global); goog.exportSymbol('proto.event_store.client.WrongExpectedVersion.CurrentStreamRevisionOptionCase', null, global); goog.exportSymbol('proto.event_store.client.WrongExpectedVersion.ExpectedStreamPositionOptionCase', 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.client.UUID = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.event_store.client.UUID.oneofGroups_); }; goog.inherits(proto.event_store.client.UUID, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.UUID.displayName = 'proto.event_store.client.UUID'; } /** * 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.client.UUID.Structured = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.UUID.Structured, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.UUID.Structured.displayName = 'proto.event_store.client.UUID.Structured'; } /** * 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.client.Empty = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.Empty, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.Empty.displayName = 'proto.event_store.client.Empty'; } /** * 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.client.StreamIdentifier = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.StreamIdentifier, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.StreamIdentifier.displayName = 'proto.event_store.client.StreamIdentifier'; } /** * 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.client.AllStreamPosition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.AllStreamPosition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.AllStreamPosition.displayName = 'proto.event_store.client.AllStreamPosition'; } /** * 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.client.WrongExpectedVersion = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.event_store.client.WrongExpectedVersion.oneofGroups_); }; goog.inherits(proto.event_store.client.WrongExpectedVersion, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.WrongExpectedVersion.displayName = 'proto.event_store.client.WrongExpectedVersion'; } /** * 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.client.AccessDenied = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.AccessDenied, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.AccessDenied.displayName = 'proto.event_store.client.AccessDenied'; } /** * 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.client.StreamDeleted = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.StreamDeleted, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.StreamDeleted.displayName = 'proto.event_store.client.StreamDeleted'; } /** * 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.client.Timeout = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.Timeout, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.Timeout.displayName = 'proto.event_store.client.Timeout'; } /** * 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.client.Unknown = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.Unknown, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.Unknown.displayName = 'proto.event_store.client.Unknown'; } /** * 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.client.InvalidTransaction = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.InvalidTransaction, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.InvalidTransaction.displayName = 'proto.event_store.client.InvalidTransaction'; } /** * 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.client.MaximumAppendSizeExceeded = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.MaximumAppendSizeExceeded, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.MaximumAppendSizeExceeded.displayName = 'proto.event_store.client.MaximumAppendSizeExceeded'; } /** * 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.client.BadRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.event_store.client.BadRequest, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.event_store.client.BadRequest.displayName = 'proto.event_store.client.BadRequest'; } /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array<!Array<number>>} * @const */ proto.event_store.client.UUID.oneofGroups_ = [[1,2]]; /** * @enum {number} */ proto.event_store.client.UUID.ValueCase = { VALUE_NOT_SET: 0, STRUCTURED: 1, STRING: 2 }; /** * @return {proto.event_store.client.UUID.ValueCase} */ proto.event_store.client.UUID.prototype.getValueCase = function() { return /** @type {proto.event_store.client.UUID.ValueCase} */(jspb.Message.computeOneofCase(this, proto.event_store.client.UUID.oneofGroups_[0])); }; 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.client.UUID.prototype.toObject = function(opt_includeInstance) { return proto.event_store.client.UUID.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.client.UUID} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.UUID.toObject = function(includeInstance, msg) { var f, obj = { structured: (f = msg.getStructured()) && proto.event_store.client.UUID.Structured.toObject(includeInstance, f), string: jspb.Message.getFieldWithDefault(msg, 2, "") }; 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.client.UUID} */ proto.event_store.client.UUID.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.client.UUID; return proto.event_store.client.UUID.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.client.UUID} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.client.UUID} */ proto.event_store.client.UUID.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.client.UUID.Structured; reader.readMessage(value,proto.event_store.client.UUID.Structured.deserializeBinaryFromReader); msg.setStructured(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setString(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.client.UUID.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.client.UUID.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.client.UUID} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.UUID.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getStructured(); if (f != null) { writer.writeMessage( 1, f, proto.event_store.client.UUID.Structured.serializeBinaryToWriter ); } f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeString( 2, f ); } }; 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.client.UUID.Structured.prototype.toObject = function(opt_includeInstance) { return proto.event_store.client.UUID.Structured.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.client.UUID.Structured} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.UUID.Structured.toObject = function(includeInstance, msg) { var f, obj = { mostSignificantBits: jspb.Message.getFieldWithDefault(msg, 1, "0"), leastSignificantBits: 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.event_store.client.UUID.Structured} */ proto.event_store.client.UUID.Structured.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.client.UUID.Structured; return proto.event_store.client.UUID.Structured.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.client.UUID.Structured} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.client.UUID.Structured} */ proto.event_store.client.UUID.Structured.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readInt64String()); msg.setMostSignificantBits(value); break; case 2: var value = /** @type {string} */ (reader.readInt64String()); msg.setLeastSignificantBits(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.client.UUID.Structured.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.client.UUID.Structured.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.client.UUID.Structured} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.UUID.Structured.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getMostSignificantBits(); if (parseInt(f, 10) !== 0) { writer.writeInt64String( 1, f ); } f = message.getLeastSignificantBits(); if (parseInt(f, 10) !== 0) { writer.writeInt64String( 2, f ); } }; /** * optional int64 most_significant_bits = 1; * @return {string} */ proto.event_store.client.UUID.Structured.prototype.getMostSignificantBits = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** * @param {string} value * @return {!proto.event_store.client.UUID.Structured} returns this */ proto.event_store.client.UUID.Structured.prototype.setMostSignificantBits = function(value) { return jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional int64 least_significant_bits = 2; * @return {string} */ proto.event_store.client.UUID.Structured.prototype.getLeastSignificantBits = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; /** * @param {string} value * @return {!proto.event_store.client.UUID.Structured} returns this */ proto.event_store.client.UUID.Structured.prototype.setLeastSignificantBits = function(value) { return jspb.Message.setProto3StringIntField(this, 2, value); }; /** * optional Structured structured = 1; * @return {?proto.event_store.client.UUID.Structured} */ proto.event_store.client.UUID.prototype.getStructured = function() { return /** @type{?proto.event_store.client.UUID.Structured} */ ( jspb.Message.getWrapperField(this, proto.event_store.client.UUID.Structured, 1)); }; /** * @param {?proto.event_store.client.UUID.Structured|undefined} value * @return {!proto.event_store.client.UUID} returns this */ proto.event_store.client.UUID.prototype.setStructured = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.event_store.client.UUID.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.client.UUID} returns this */ proto.event_store.client.UUID.prototype.clearStructured = function() { return this.setStructured(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.client.UUID.prototype.hasStructured = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional string string = 2; * @return {string} */ proto.event_store.client.UUID.prototype.getString = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.event_store.client.UUID} returns this */ proto.event_store.client.UUID.prototype.setString = function(value) { return jspb.Message.setOneofField(this, 2, proto.event_store.client.UUID.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.event_store.client.UUID} returns this */ proto.event_store.client.UUID.prototype.clearString = function() { return jspb.Message.setOneofField(this, 2, proto.event_store.client.UUID.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.client.UUID.prototype.hasString = 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.client.Empty.prototype.toObject = function(opt_includeInstance) { return proto.event_store.client.Empty.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.client.Empty} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.Empty.toObject = function(includeInstance, msg) { var f, obj = { }; 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.client.Empty} */ proto.event_store.client.Empty.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.client.Empty; return proto.event_store.client.Empty.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.client.Empty} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.client.Empty} */ proto.event_store.client.Empty.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.client.Empty.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.client.Empty.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.client.Empty} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.Empty.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; 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.client.StreamIdentifier.prototype.toObject = function(opt_includeInstance) { return proto.event_store.client.StreamIdentifier.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.client.StreamIdentifier} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.StreamIdentifier.toObject = function(includeInstance, msg) { var f, obj = { streamName: msg.getStreamName_asB64() }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.event_store.client.StreamIdentifier} */ proto.event_store.client.StreamIdentifier.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.client.StreamIdentifier; return proto.event_store.client.StreamIdentifier.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.client.StreamIdentifier} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.client.StreamIdentifier} */ proto.event_store.client.StreamIdentifier.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 3: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setStreamName(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.client.StreamIdentifier.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.client.StreamIdentifier.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.client.StreamIdentifier} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.StreamIdentifier.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getStreamName_asU8(); if (f.length > 0) { writer.writeBytes( 3, f ); } }; /** * optional bytes stream_name = 3; * @return {!(string|Uint8Array)} */ proto.event_store.client.StreamIdentifier.prototype.getStreamName = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * optional bytes stream_name = 3; * This is a type-conversion wrapper around `getStreamName()` * @return {string} */ proto.event_store.client.StreamIdentifier.prototype.getStreamName_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getStreamName())); }; /** * optional bytes stream_name = 3; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getStreamName()` * @return {!Uint8Array} */ proto.event_store.client.StreamIdentifier.prototype.getStreamName_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getStreamName())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.event_store.client.StreamIdentifier} returns this */ proto.event_store.client.StreamIdentifier.prototype.setStreamName = function(value) { return jspb.Message.setProto3BytesField(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.client.AllStreamPosition.prototype.toObject = function(opt_includeInstance) { return proto.event_store.client.AllStreamPosition.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.client.AllStreamPosition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.AllStreamPosition.toObject = function(includeInstance, msg) { var f, obj = { commitPosition: jspb.Message.getFieldWithDefault(msg, 1, "0"), preparePosition: 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.event_store.client.AllStreamPosition} */ proto.event_store.client.AllStreamPosition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.client.AllStreamPosition; return proto.event_store.client.AllStreamPosition.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.client.AllStreamPosition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.client.AllStreamPosition} */ proto.event_store.client.AllStreamPosition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readUint64String()); msg.setCommitPosition(value); break; case 2: var value = /** @type {string} */ (reader.readUint64String()); msg.setPreparePosition(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.client.AllStreamPosition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.client.AllStreamPosition.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.client.AllStreamPosition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.AllStreamPosition.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCommitPosition(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( 1, f ); } f = message.getPreparePosition(); if (parseInt(f, 10) !== 0) { writer.writeUint64String( 2, f ); } }; /** * optional uint64 commit_position = 1; * @return {string} */ proto.event_store.client.AllStreamPosition.prototype.getCommitPosition = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** * @param {string} value * @return {!proto.event_store.client.AllStreamPosition} returns this */ proto.event_store.client.AllStreamPosition.prototype.setCommitPosition = function(value) { return jspb.Message.setProto3StringIntField(this, 1, value); }; /** * optional uint64 prepare_position = 2; * @return {string} */ proto.event_store.client.AllStreamPosition.prototype.getPreparePosition = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); }; /** * @param {string} value * @return {!proto.event_store.client.AllStreamPosition} returns this */ proto.event_store.client.AllStreamPosition.prototype.setPreparePosition = function(value) { return jspb.Message.setProto3StringIntField(this, 2, value); }; /** * Oneof group definitions for this message. Each group defines the field * numbers belonging to that group. When of these fields' value is set, all * other fields in the group are cleared. During deserialization, if multiple * fields are encountered for a group, only the last value seen will be kept. * @private {!Array<!Array<number>>} * @const */ proto.event_store.client.WrongExpectedVersion.oneofGroups_ = [[1,2],[3,4,5,6]]; /** * @enum {number} */ proto.event_store.client.WrongExpectedVersion.CurrentStreamRevisionOptionCase = { CURRENT_STREAM_REVISION_OPTION_NOT_SET: 0, CURRENT_STREAM_REVISION: 1, CURRENT_NO_STREAM: 2 }; /** * @return {proto.event_store.client.WrongExpectedVersion.CurrentStreamRevisionOptionCase} */ proto.event_store.client.WrongExpectedVersion.prototype.getCurrentStreamRevisionOptionCase = function() { return /** @type {proto.event_store.client.WrongExpectedVersion.CurrentStreamRevisionOptionCase} */(jspb.Message.computeOneofCase(this, proto.event_store.client.WrongExpectedVersion.oneofGroups_[0])); }; /** * @enum {number} */ proto.event_store.client.WrongExpectedVersion.ExpectedStreamPositionOptionCase = { EXPECTED_STREAM_POSITION_OPTION_NOT_SET: 0, EXPECTED_STREAM_POSITION: 3, EXPECTED_ANY: 4, EXPECTED_STREAM_EXISTS: 5, EXPECTED_NO_STREAM: 6 }; /** * @return {proto.event_store.client.WrongExpectedVersion.ExpectedStreamPositionOptionCase} */ proto.event_store.client.WrongExpectedVersion.prototype.getExpectedStreamPositionOptionCase = function() { return /** @type {proto.event_store.client.WrongExpectedVersion.ExpectedStreamPositionOptionCase} */(jspb.Message.computeOneofCase(this, proto.event_store.client.WrongExpectedVersion.oneofGroups_[1])); }; 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.client.WrongExpectedVersion.prototype.toObject = function(opt_includeInstance) { return proto.event_store.client.WrongExpectedVersion.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.client.WrongExpectedVersion} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.WrongExpectedVersion.toObject = function(includeInstance, msg) { var f, obj = { currentStreamRevision: jspb.Message.getFieldWithDefault(msg, 1, "0"), currentNoStream: (f = msg.getCurrentNoStream()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f), expectedStreamPosition: jspb.Message.getFieldWithDefault(msg, 3, "0"), expectedAny: (f = msg.getExpectedAny()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f), expectedStreamExists: (f = msg.getExpectedStreamExists()) && google_protobuf_empty_pb.Empty.toObject(includeInstance, f), expectedNoStream: (f = msg.getExpectedNoStream()) && google_protobuf_empty_pb.Empty.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.client.WrongExpectedVersion} */ proto.event_store.client.WrongExpectedVersion.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.event_store.client.WrongExpectedVersion; return proto.event_store.client.WrongExpectedVersion.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.event_store.client.WrongExpectedVersion} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.event_store.client.WrongExpectedVersion} */ proto.event_store.client.WrongExpectedVersion.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readUint64String()); msg.setCurrentStreamRevision(value); break; case 2: var value = new google_protobuf_empty_pb.Empty; reader.readMessage(value,google_protobuf_empty_pb.Empty.deserializeBinaryFromReader); msg.setCurrentNoStream(value); break; case 3: var value = /** @type {string} */ (reader.readUint64String()); msg.setExpectedStreamPosition(value); break; case 4: var value = new google_protobuf_empty_pb.Empty; reader.readMessage(value,google_protobuf_empty_pb.Empty.deserializeBinaryFromReader); msg.setExpectedAny(value); break; case 5: var value = new google_protobuf_empty_pb.Empty; reader.readMessage(value,google_protobuf_empty_pb.Empty.deserializeBinaryFromReader); msg.setExpectedStreamExists(value); break; case 6: var value = new google_protobuf_empty_pb.Empty; reader.readMessage(value,google_protobuf_empty_pb.Empty.deserializeBinaryFromReader); msg.setExpectedNoStream(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.event_store.client.WrongExpectedVersion.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.event_store.client.WrongExpectedVersion.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.client.WrongExpectedVersion} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.event_store.client.WrongExpectedVersion.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeUint64String( 1, f ); } f = message.getCurrentNoStream(); if (f != null) { writer.writeMessage( 2, f, google_protobuf_empty_pb.Empty.serializeBinaryToWriter ); } f = /** @type {string} */ (jspb.Message.getField(message, 3)); if (f != null) { writer.writeUint64String( 3, f ); } f = message.getExpectedAny(); if (f != null) { writer.writeMessage( 4, f, google_protobuf_empty_pb.Empty.serializeBinaryToWriter ); } f = message.getExpectedStreamExists(); if (f != null) { writer.writeMessage( 5, f, google_protobuf_empty_pb.Empty.serializeBinaryToWriter ); } f = message.getExpectedNoStream(); if (f != null) { writer.writeMessage( 6, f, google_protobuf_empty_pb.Empty.serializeBinaryToWriter ); } }; /** * optional uint64 current_stream_revision = 1; * @return {string} */ proto.event_store.client.WrongExpectedVersion.prototype.getCurrentStreamRevision = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** * @param {string} value * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.WrongExpectedVersion.prototype.setCurrentStreamRevision = function(value) { return jspb.Message.setOneofField(this, 1, proto.event_store.client.WrongExpectedVersion.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.WrongExpectedVersion.prototype.clearCurrentStreamRevision = function() { return jspb.Message.setOneofField(this, 1, proto.event_store.client.WrongExpectedVersion.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.client.WrongExpectedVersion.prototype.hasCurrentStreamRevision = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional google.protobuf.Empty current_no_stream = 2; * @return {?proto.google.protobuf.Empty} */ proto.event_store.client.WrongExpectedVersion.prototype.getCurrentNoStream = function() { return /** @type{?proto.google.protobuf.Empty} */ ( jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 2)); }; /** * @param {?proto.google.protobuf.Empty|undefined} value * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.WrongExpectedVersion.prototype.setCurrentNoStream = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.event_store.client.WrongExpectedVersion.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.WrongExpectedVersion.prototype.clearCurrentNoStream = function() { return this.setCurrentNoStream(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.client.WrongExpectedVersion.prototype.hasCurrentNoStream = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional uint64 expected_stream_position = 3; * @return {string} */ proto.event_store.client.WrongExpectedVersion.prototype.getExpectedStreamPosition = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); }; /** * @param {string} value * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.WrongExpectedVersion.prototype.setExpectedStreamPosition = function(value) { return jspb.Message.setOneofField(this, 3, proto.event_store.client.WrongExpectedVersion.oneofGroups_[1], value); }; /** * Clears the field making it undefined. * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.WrongExpectedVersion.prototype.clearExpectedStreamPosition = function() { return jspb.Message.setOneofField(this, 3, proto.event_store.client.WrongExpectedVersion.oneofGroups_[1], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.client.WrongExpectedVersion.prototype.hasExpectedStreamPosition = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional google.protobuf.Empty expected_any = 4; * @return {?proto.google.protobuf.Empty} */ proto.event_store.client.WrongExpectedVersion.prototype.getExpectedAny = function() { return /** @type{?proto.google.protobuf.Empty} */ ( jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 4)); }; /** * @param {?proto.google.protobuf.Empty|undefined} value * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.WrongExpectedVersion.prototype.setExpectedAny = function(value) { return jspb.Message.setOneofWrapperField(this, 4, proto.event_store.client.WrongExpectedVersion.oneofGroups_[1], value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.WrongExpectedVersion.prototype.clearExpectedAny = function() { return this.setExpectedAny(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.event_store.client.WrongExpectedVersion.prototype.hasExpectedAny = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional google.protobuf.Empty expected_stream_exists = 5; * @return {?proto.google.protobuf.Empty} */ proto.event_store.client.WrongExpectedVersion.prototype.getExpectedStreamExists = function() { return /** @type{?proto.google.protobuf.Empty} */ ( jspb.Message.getWrapperField(this, google_protobuf_empty_pb.Empty, 5)); }; /** * @param {?proto.google.protobuf.Empty|undefined} value * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.WrongExpectedVersion.prototype.setExpectedStreamExists = function(value) { return jspb.Message.setOneofWrapperField(this, 5, proto.event_store.client.WrongExpectedVersion.oneofGroups_[1], value); }; /** * Clears the message field making it undefined. * @return {!proto.event_store.client.WrongExpectedVersion} returns this */ proto.event_store.client.Wrong