UNPKG

@lightbend/akkaserverless-javascript-sdk

Version:
721 lines (626 loc) 20.9 kB
// source: example.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_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); goog.object.extend(proto, google_protobuf_any_pb); var akkaserverless_annotations_pb = require('./akkaserverless/annotations_pb.js'); goog.object.extend(proto, akkaserverless_annotations_pb); goog.exportSymbol('proto.com.example.Example', null, global); goog.exportSymbol('proto.com.example.In', null, global); goog.exportSymbol('proto.com.example.Out', null, global); goog.exportSymbol('proto.com.example.PrimitiveLike', 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.com.example.Example = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.example.Example, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.example.Example.displayName = 'proto.com.example.Example'; } /** * 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.com.example.PrimitiveLike = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.example.PrimitiveLike, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.example.PrimitiveLike.displayName = 'proto.com.example.PrimitiveLike'; } /** * 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.com.example.In = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.example.In, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.example.In.displayName = 'proto.com.example.In'; } /** * 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.com.example.Out = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.com.example.Out, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.com.example.Out.displayName = 'proto.com.example.Out'; } 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.com.example.Example.prototype.toObject = function(opt_includeInstance) { return proto.com.example.Example.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.com.example.Example} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.example.Example.toObject = function(includeInstance, msg) { var f, obj = { field1: jspb.Message.getFieldWithDefault(msg, 1, ""), field2: 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.com.example.Example} */ proto.com.example.Example.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.example.Example; return proto.com.example.Example.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.com.example.Example} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.example.Example} */ proto.com.example.Example.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.setField1(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setField2(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.com.example.Example.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.example.Example.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.com.example.Example} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.example.Example.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getField1(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getField2(); if (f.length > 0) { writer.writeString( 2, f ); } }; /** * optional string field1 = 1; * @return {string} */ proto.com.example.Example.prototype.getField1 = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.com.example.Example} returns this */ proto.com.example.Example.prototype.setField1 = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string field2 = 2; * @return {string} */ proto.com.example.Example.prototype.getField2 = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.com.example.Example} returns this */ proto.com.example.Example.prototype.setField2 = function(value) { return jspb.Message.setProto3StringField(this, 2, 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.com.example.PrimitiveLike.prototype.toObject = function(opt_includeInstance) { return proto.com.example.PrimitiveLike.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.com.example.PrimitiveLike} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.example.PrimitiveLike.toObject = function(includeInstance, msg) { var f, obj = { field1: jspb.Message.getFieldWithDefault(msg, 1, ""), field2: jspb.Message.getFieldWithDefault(msg, 2, ""), field15: jspb.Message.getFieldWithDefault(msg, 15, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.com.example.PrimitiveLike} */ proto.com.example.PrimitiveLike.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.example.PrimitiveLike; return proto.com.example.PrimitiveLike.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.com.example.PrimitiveLike} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.example.PrimitiveLike} */ proto.com.example.PrimitiveLike.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.setField1(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setField2(value); break; case 15: var value = /** @type {string} */ (reader.readString()); msg.setField15(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.com.example.PrimitiveLike.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.example.PrimitiveLike.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.com.example.PrimitiveLike} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.example.PrimitiveLike.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getField1(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getField2(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getField15(); if (f.length > 0) { writer.writeString( 15, f ); } }; /** * optional string field1 = 1; * @return {string} */ proto.com.example.PrimitiveLike.prototype.getField1 = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.com.example.PrimitiveLike} returns this */ proto.com.example.PrimitiveLike.prototype.setField1 = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string field2 = 2; * @return {string} */ proto.com.example.PrimitiveLike.prototype.getField2 = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.com.example.PrimitiveLike} returns this */ proto.com.example.PrimitiveLike.prototype.setField2 = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional string field15 = 15; * @return {string} */ proto.com.example.PrimitiveLike.prototype.getField15 = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 15, "")); }; /** * @param {string} value * @return {!proto.com.example.PrimitiveLike} returns this */ proto.com.example.PrimitiveLike.prototype.setField15 = function(value) { return jspb.Message.setProto3StringField(this, 15, 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.com.example.In.prototype.toObject = function(opt_includeInstance) { return proto.com.example.In.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.com.example.In} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.example.In.toObject = function(includeInstance, msg) { var f, obj = { field: 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.com.example.In} */ proto.com.example.In.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.example.In; return proto.com.example.In.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.com.example.In} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.example.In} */ proto.com.example.In.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.setField(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.com.example.In.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.example.In.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.com.example.In} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.example.In.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getField(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string field = 1; * @return {string} */ proto.com.example.In.prototype.getField = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.com.example.In} returns this */ proto.com.example.In.prototype.setField = function(value) { return jspb.Message.setProto3StringField(this, 1, 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.com.example.Out.prototype.toObject = function(opt_includeInstance) { return proto.com.example.Out.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.com.example.Out} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.example.Out.toObject = function(includeInstance, msg) { var f, obj = { field: 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.com.example.Out} */ proto.com.example.Out.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.com.example.Out; return proto.com.example.Out.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.com.example.Out} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.com.example.Out} */ proto.com.example.Out.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.setField(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.com.example.Out.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.com.example.Out.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.com.example.Out} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.com.example.Out.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getField(); if (f.length > 0) { writer.writeString( 1, f ); } }; /** * optional string field = 1; * @return {string} */ proto.com.example.Out.prototype.getField = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.com.example.Out} returns this */ proto.com.example.Out.prototype.setField = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; goog.object.extend(exports, proto.com.example);