| /** |
| * @fileoverview |
| * @enhanceable |
| * @suppress {messageConventions} JS Compiler reports an error if a variable or |
| * field starts with 'MSG_' and isn't a translatable message. |
| * @public |
| */ |
| // GENERATED CODE -- DO NOT EDIT! |
| |
| var jspb = require('google-protobuf'); |
| var goog = jspb; |
| var global = Function('return this')(); |
| |
| goog.exportSymbol('proto.io.statefun.sdk.egress.KinesisEgressRecord', 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.io.statefun.sdk.egress.KinesisEgressRecord = function(opt_data) { |
| jspb.Message.initialize(this, opt_data, 0, -1, null, null); |
| }; |
| goog.inherits(proto.io.statefun.sdk.egress.KinesisEgressRecord, jspb.Message); |
| if (goog.DEBUG && !COMPILED) { |
| /** |
| * @public |
| * @override |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.displayName = 'proto.io.statefun.sdk.egress.KinesisEgressRecord'; |
| } |
| |
| |
| |
| if (jspb.Message.GENERATE_TO_OBJECT) { |
| /** |
| * Creates an object representation of this proto suitable for use in Soy templates. |
| * Field names that are reserved in JavaScript and will be renamed to pb_name. |
| * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default. |
| * For the list of reserved names please see: |
| * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. |
| * @param {boolean=} opt_includeInstance Whether to include the JSPB instance |
| * for transitional soy proto support: http://goto/soy-param-migration |
| * @return {!Object} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.toObject = function(opt_includeInstance) { |
| return proto.io.statefun.sdk.egress.KinesisEgressRecord.toObject(opt_includeInstance, this); |
| }; |
| |
| |
| /** |
| * Static version of the {@see toObject} method. |
| * @param {boolean|undefined} includeInstance Whether to include the JSPB |
| * instance for transitional soy proto support: |
| * http://goto/soy-param-migration |
| * @param {!proto.io.statefun.sdk.egress.KinesisEgressRecord} msg The msg instance to transform. |
| * @return {!Object} |
| * @suppress {unusedLocalVariables} f is only used for nested messages |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.toObject = function(includeInstance, msg) { |
| var f, obj = { |
| partitionKey: jspb.Message.getFieldWithDefault(msg, 1, ""), |
| valueBytes: msg.getValueBytes_asB64(), |
| stream: jspb.Message.getFieldWithDefault(msg, 3, ""), |
| explicitHashKey: 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.io.statefun.sdk.egress.KinesisEgressRecord} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.deserializeBinary = function(bytes) { |
| var reader = new jspb.BinaryReader(bytes); |
| var msg = new proto.io.statefun.sdk.egress.KinesisEgressRecord; |
| return proto.io.statefun.sdk.egress.KinesisEgressRecord.deserializeBinaryFromReader(msg, reader); |
| }; |
| |
| |
| /** |
| * Deserializes binary data (in protobuf wire format) from the |
| * given reader into the given message object. |
| * @param {!proto.io.statefun.sdk.egress.KinesisEgressRecord} msg The message object to deserialize into. |
| * @param {!jspb.BinaryReader} reader The BinaryReader to use. |
| * @return {!proto.io.statefun.sdk.egress.KinesisEgressRecord} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.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.setPartitionKey(value); |
| break; |
| case 2: |
| var value = /** @type {!Uint8Array} */ (reader.readBytes()); |
| msg.setValueBytes(value); |
| break; |
| case 3: |
| var value = /** @type {string} */ (reader.readString()); |
| msg.setStream(value); |
| break; |
| case 4: |
| var value = /** @type {string} */ (reader.readString()); |
| msg.setExplicitHashKey(value); |
| break; |
| default: |
| reader.skipField(); |
| break; |
| } |
| } |
| return msg; |
| }; |
| |
| |
| /** |
| * Serializes the message to binary data (in protobuf wire format). |
| * @return {!Uint8Array} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.serializeBinary = function() { |
| var writer = new jspb.BinaryWriter(); |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.serializeBinaryToWriter(this, writer); |
| return writer.getResultBuffer(); |
| }; |
| |
| |
| /** |
| * Serializes the given message to binary data (in protobuf wire |
| * format), writing to the given BinaryWriter. |
| * @param {!proto.io.statefun.sdk.egress.KinesisEgressRecord} message |
| * @param {!jspb.BinaryWriter} writer |
| * @suppress {unusedLocalVariables} f is only used for nested messages |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.serializeBinaryToWriter = function(message, writer) { |
| var f = undefined; |
| f = message.getPartitionKey(); |
| if (f.length > 0) { |
| writer.writeString( |
| 1, |
| f |
| ); |
| } |
| f = message.getValueBytes_asU8(); |
| if (f.length > 0) { |
| writer.writeBytes( |
| 2, |
| f |
| ); |
| } |
| f = message.getStream(); |
| if (f.length > 0) { |
| writer.writeString( |
| 3, |
| f |
| ); |
| } |
| f = message.getExplicitHashKey(); |
| if (f.length > 0) { |
| writer.writeString( |
| 4, |
| f |
| ); |
| } |
| }; |
| |
| |
| /** |
| * optional string partition_key = 1; |
| * @return {string} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.getPartitionKey = function() { |
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); |
| }; |
| |
| |
| /** @param {string} value */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.setPartitionKey = function(value) { |
| jspb.Message.setProto3StringField(this, 1, value); |
| }; |
| |
| |
| /** |
| * optional bytes value_bytes = 2; |
| * @return {!(string|Uint8Array)} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.getValueBytes = function() { |
| return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); |
| }; |
| |
| |
| /** |
| * optional bytes value_bytes = 2; |
| * This is a type-conversion wrapper around `getValueBytes()` |
| * @return {string} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.getValueBytes_asB64 = function() { |
| return /** @type {string} */ (jspb.Message.bytesAsB64( |
| this.getValueBytes())); |
| }; |
| |
| |
| /** |
| * optional bytes value_bytes = 2; |
| * Note that Uint8Array is not supported on all browsers. |
| * @see http://caniuse.com/Uint8Array |
| * This is a type-conversion wrapper around `getValueBytes()` |
| * @return {!Uint8Array} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.getValueBytes_asU8 = function() { |
| return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( |
| this.getValueBytes())); |
| }; |
| |
| |
| /** @param {!(string|Uint8Array)} value */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.setValueBytes = function(value) { |
| jspb.Message.setProto3BytesField(this, 2, value); |
| }; |
| |
| |
| /** |
| * optional string stream = 3; |
| * @return {string} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.getStream = function() { |
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); |
| }; |
| |
| |
| /** @param {string} value */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.setStream = function(value) { |
| jspb.Message.setProto3StringField(this, 3, value); |
| }; |
| |
| |
| /** |
| * optional string explicit_hash_key = 4; |
| * @return {string} |
| */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.getExplicitHashKey = function() { |
| return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); |
| }; |
| |
| |
| /** @param {string} value */ |
| proto.io.statefun.sdk.egress.KinesisEgressRecord.prototype.setExplicitHashKey = function(value) { |
| jspb.Message.setProto3StringField(this, 4, value); |
| }; |
| |
| |
| goog.object.extend(exports, proto.io.statefun.sdk.egress); |