UNPKG

@lightbend/akkaserverless-javascript-sdk

Version:
765 lines (656 loc) 23.5 kB
// source: akkaserverless/eventing.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('return this')(); var google_protobuf_descriptor_pb = require('google-protobuf/google/protobuf/descriptor_pb.js'); goog.object.extend(proto, google_protobuf_descriptor_pb); goog.exportSymbol('proto.akkaserverless.EventDestination', null, global); goog.exportSymbol('proto.akkaserverless.EventDestination.DestinationCase', null, global); goog.exportSymbol('proto.akkaserverless.EventSource', null, global); goog.exportSymbol('proto.akkaserverless.EventSource.SourceCase', null, global); goog.exportSymbol('proto.akkaserverless.Eventing', 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.akkaserverless.Eventing = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.akkaserverless.Eventing, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.akkaserverless.Eventing.displayName = 'proto.akkaserverless.Eventing'; } /** * 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.akkaserverless.EventSource = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.akkaserverless.EventSource.oneofGroups_); }; goog.inherits(proto.akkaserverless.EventSource, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.akkaserverless.EventSource.displayName = 'proto.akkaserverless.EventSource'; } /** * 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.akkaserverless.EventDestination = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.akkaserverless.EventDestination.oneofGroups_); }; goog.inherits(proto.akkaserverless.EventDestination, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.akkaserverless.EventDestination.displayName = 'proto.akkaserverless.EventDestination'; } 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.akkaserverless.Eventing.prototype.toObject = function(opt_includeInstance) { return proto.akkaserverless.Eventing.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.akkaserverless.Eventing} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.akkaserverless.Eventing.toObject = function(includeInstance, msg) { var f, obj = { pb_in: (f = msg.getIn()) && proto.akkaserverless.EventSource.toObject(includeInstance, f), out: (f = msg.getOut()) && proto.akkaserverless.EventDestination.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.akkaserverless.Eventing} */ proto.akkaserverless.Eventing.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.akkaserverless.Eventing; return proto.akkaserverless.Eventing.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.akkaserverless.Eventing} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.akkaserverless.Eventing} */ proto.akkaserverless.Eventing.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.akkaserverless.EventSource; reader.readMessage(value,proto.akkaserverless.EventSource.deserializeBinaryFromReader); msg.setIn(value); break; case 2: var value = new proto.akkaserverless.EventDestination; reader.readMessage(value,proto.akkaserverless.EventDestination.deserializeBinaryFromReader); msg.setOut(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.akkaserverless.Eventing.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.akkaserverless.Eventing.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.akkaserverless.Eventing} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.akkaserverless.Eventing.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getIn(); if (f != null) { writer.writeMessage( 1, f, proto.akkaserverless.EventSource.serializeBinaryToWriter ); } f = message.getOut(); if (f != null) { writer.writeMessage( 2, f, proto.akkaserverless.EventDestination.serializeBinaryToWriter ); } }; /** * optional EventSource in = 1; * @return {?proto.akkaserverless.EventSource} */ proto.akkaserverless.Eventing.prototype.getIn = function() { return /** @type{?proto.akkaserverless.EventSource} */ ( jspb.Message.getWrapperField(this, proto.akkaserverless.EventSource, 1)); }; /** * @param {?proto.akkaserverless.EventSource|undefined} value * @return {!proto.akkaserverless.Eventing} returns this */ proto.akkaserverless.Eventing.prototype.setIn = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. * @return {!proto.akkaserverless.Eventing} returns this */ proto.akkaserverless.Eventing.prototype.clearIn = function() { return this.setIn(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.akkaserverless.Eventing.prototype.hasIn = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional EventDestination out = 2; * @return {?proto.akkaserverless.EventDestination} */ proto.akkaserverless.Eventing.prototype.getOut = function() { return /** @type{?proto.akkaserverless.EventDestination} */ ( jspb.Message.getWrapperField(this, proto.akkaserverless.EventDestination, 2)); }; /** * @param {?proto.akkaserverless.EventDestination|undefined} value * @return {!proto.akkaserverless.Eventing} returns this */ proto.akkaserverless.Eventing.prototype.setOut = function(value) { return jspb.Message.setWrapperField(this, 2, value); }; /** * Clears the message field making it undefined. * @return {!proto.akkaserverless.Eventing} returns this */ proto.akkaserverless.Eventing.prototype.clearOut = function() { return this.setOut(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.akkaserverless.Eventing.prototype.hasOut = function() { return jspb.Message.getField(this, 2) != null; }; /** * 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.akkaserverless.EventSource.oneofGroups_ = [[2,3,4]]; /** * @enum {number} */ proto.akkaserverless.EventSource.SourceCase = { SOURCE_NOT_SET: 0, TOPIC: 2, EVENT_SOURCED_ENTITY: 3, VALUE_ENTITY: 4 }; /** * @return {proto.akkaserverless.EventSource.SourceCase} */ proto.akkaserverless.EventSource.prototype.getSourceCase = function() { return /** @type {proto.akkaserverless.EventSource.SourceCase} */(jspb.Message.computeOneofCase(this, proto.akkaserverless.EventSource.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.akkaserverless.EventSource.prototype.toObject = function(opt_includeInstance) { return proto.akkaserverless.EventSource.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.akkaserverless.EventSource} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.akkaserverless.EventSource.toObject = function(includeInstance, msg) { var f, obj = { consumerGroup: jspb.Message.getFieldWithDefault(msg, 1, ""), topic: jspb.Message.getFieldWithDefault(msg, 2, ""), eventSourcedEntity: jspb.Message.getFieldWithDefault(msg, 3, ""), valueEntity: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.akkaserverless.EventSource} */ proto.akkaserverless.EventSource.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.akkaserverless.EventSource; return proto.akkaserverless.EventSource.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.akkaserverless.EventSource} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.akkaserverless.EventSource} */ proto.akkaserverless.EventSource.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setConsumerGroup(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setTopic(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setEventSourcedEntity(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setValueEntity(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.akkaserverless.EventSource.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.akkaserverless.EventSource.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.akkaserverless.EventSource} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.akkaserverless.EventSource.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getConsumerGroup(); if (f.length > 0) { writer.writeString( 1, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 2)); if (f != null) { writer.writeString( 2, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 3)); if (f != null) { writer.writeString( 3, f ); } f = /** @type {string} */ (jspb.Message.getField(message, 4)); if (f != null) { writer.writeString( 4, f ); } }; /** * optional string consumer_group = 1; * @return {string} */ proto.akkaserverless.EventSource.prototype.getConsumerGroup = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.akkaserverless.EventSource} returns this */ proto.akkaserverless.EventSource.prototype.setConsumerGroup = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string topic = 2; * @return {string} */ proto.akkaserverless.EventSource.prototype.getTopic = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.akkaserverless.EventSource} returns this */ proto.akkaserverless.EventSource.prototype.setTopic = function(value) { return jspb.Message.setOneofField(this, 2, proto.akkaserverless.EventSource.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.akkaserverless.EventSource} returns this */ proto.akkaserverless.EventSource.prototype.clearTopic = function() { return jspb.Message.setOneofField(this, 2, proto.akkaserverless.EventSource.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.akkaserverless.EventSource.prototype.hasTopic = function() { return jspb.Message.getField(this, 2) != null; }; /** * optional string event_sourced_entity = 3; * @return {string} */ proto.akkaserverless.EventSource.prototype.getEventSourcedEntity = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.akkaserverless.EventSource} returns this */ proto.akkaserverless.EventSource.prototype.setEventSourcedEntity = function(value) { return jspb.Message.setOneofField(this, 3, proto.akkaserverless.EventSource.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.akkaserverless.EventSource} returns this */ proto.akkaserverless.EventSource.prototype.clearEventSourcedEntity = function() { return jspb.Message.setOneofField(this, 3, proto.akkaserverless.EventSource.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.akkaserverless.EventSource.prototype.hasEventSourcedEntity = function() { return jspb.Message.getField(this, 3) != null; }; /** * optional string value_entity = 4; * @return {string} */ proto.akkaserverless.EventSource.prototype.getValueEntity = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.akkaserverless.EventSource} returns this */ proto.akkaserverless.EventSource.prototype.setValueEntity = function(value) { return jspb.Message.setOneofField(this, 4, proto.akkaserverless.EventSource.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.akkaserverless.EventSource} returns this */ proto.akkaserverless.EventSource.prototype.clearValueEntity = function() { return jspb.Message.setOneofField(this, 4, proto.akkaserverless.EventSource.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.akkaserverless.EventSource.prototype.hasValueEntity = function() { return jspb.Message.getField(this, 4) != null; }; /** * 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.akkaserverless.EventDestination.oneofGroups_ = [[1]]; /** * @enum {number} */ proto.akkaserverless.EventDestination.DestinationCase = { DESTINATION_NOT_SET: 0, TOPIC: 1 }; /** * @return {proto.akkaserverless.EventDestination.DestinationCase} */ proto.akkaserverless.EventDestination.prototype.getDestinationCase = function() { return /** @type {proto.akkaserverless.EventDestination.DestinationCase} */(jspb.Message.computeOneofCase(this, proto.akkaserverless.EventDestination.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.akkaserverless.EventDestination.prototype.toObject = function(opt_includeInstance) { return proto.akkaserverless.EventDestination.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.akkaserverless.EventDestination} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.akkaserverless.EventDestination.toObject = function(includeInstance, msg) { var f, obj = { topic: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.akkaserverless.EventDestination} */ proto.akkaserverless.EventDestination.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.akkaserverless.EventDestination; return proto.akkaserverless.EventDestination.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.akkaserverless.EventDestination} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.akkaserverless.EventDestination} */ proto.akkaserverless.EventDestination.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); msg.setTopic(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.akkaserverless.EventDestination.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.akkaserverless.EventDestination.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.akkaserverless.EventDestination} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.akkaserverless.EventDestination.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = /** @type {string} */ (jspb.Message.getField(message, 1)); if (f != null) { writer.writeString( 1, f ); } }; /** * optional string topic = 1; * @return {string} */ proto.akkaserverless.EventDestination.prototype.getTopic = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.akkaserverless.EventDestination} returns this */ proto.akkaserverless.EventDestination.prototype.setTopic = function(value) { return jspb.Message.setOneofField(this, 1, proto.akkaserverless.EventDestination.oneofGroups_[0], value); }; /** * Clears the field making it undefined. * @return {!proto.akkaserverless.EventDestination} returns this */ proto.akkaserverless.EventDestination.prototype.clearTopic = function() { return jspb.Message.setOneofField(this, 1, proto.akkaserverless.EventDestination.oneofGroups_[0], undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.akkaserverless.EventDestination.prototype.hasTopic = function() { return jspb.Message.getField(this, 1) != null; }; goog.object.extend(exports, proto.akkaserverless);