UNPKG

@routerprotocol/chain-api

Version:

Router Chain API Query client with generated gRPC bindings.

1,134 lines (980 loc) 37 kB
// source: routerprotocol/routerchain/crosschain/ibc_send_payload.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 gogoproto_gogo_pb = require('../../../gogoproto/gogo_pb.js'); goog.object.extend(proto, gogoproto_gogo_pb); goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.AckRequestPayload', null, global); goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.IBCRequestPayload', null, global); goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.SendCase', null, global); goog.exportSymbol('proto.routerprotocol.routerchain.crosschain.RequestPayload', 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.routerprotocol.routerchain.crosschain.AckRequestPayload = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.routerprotocol.routerchain.crosschain.AckRequestPayload, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.displayName = 'proto.routerprotocol.routerchain.crosschain.AckRequestPayload'; } /** * 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.routerprotocol.routerchain.crosschain.RequestPayload = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.routerprotocol.routerchain.crosschain.RequestPayload, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.routerprotocol.routerchain.crosschain.RequestPayload.displayName = 'proto.routerprotocol.routerchain.crosschain.RequestPayload'; } /** * 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.routerprotocol.routerchain.crosschain.IBCRequestPayload = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.oneofGroups_); }; goog.inherits(proto.routerprotocol.routerchain.crosschain.IBCRequestPayload, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.displayName = 'proto.routerprotocol.routerchain.crosschain.IBCRequestPayload'; } 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.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.toObject = function(opt_includeInstance) { return proto.routerprotocol.routerchain.crosschain.AckRequestPayload.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.routerprotocol.routerchain.crosschain.AckRequestPayload} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.toObject = function(includeInstance, msg) { var f, obj = { requestIdentifier: jspb.Message.getFieldWithDefault(msg, 1, 0), ackRequestIdentifier: jspb.Message.getFieldWithDefault(msg, 2, 0), srcChainId: jspb.Message.getFieldWithDefault(msg, 3, ""), destChainId: jspb.Message.getFieldWithDefault(msg, 4, ""), requestSender: jspb.Message.getFieldWithDefault(msg, 5, ""), execData: msg.getExecData_asB64(), execStatus: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), blockHeight: jspb.Message.getFieldWithDefault(msg, 8, 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.routerprotocol.routerchain.crosschain.AckRequestPayload} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.routerprotocol.routerchain.crosschain.AckRequestPayload; return proto.routerprotocol.routerchain.crosschain.AckRequestPayload.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {number} */ (reader.readUint64()); msg.setRequestIdentifier(value); break; case 2: var value = /** @type {number} */ (reader.readUint64()); msg.setAckRequestIdentifier(value); break; case 3: var value = /** @type {string} */ (reader.readString()); msg.setSrcChainId(value); break; case 4: var value = /** @type {string} */ (reader.readString()); msg.setDestChainId(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setRequestSender(value); break; case 6: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setExecData(value); break; case 7: var value = /** @type {boolean} */ (reader.readBool()); msg.setExecStatus(value); break; case 8: var value = /** @type {number} */ (reader.readUint64()); msg.setBlockHeight(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.routerprotocol.routerchain.crosschain.AckRequestPayload.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRequestIdentifier(); if (f !== 0) { writer.writeUint64( 1, f ); } f = message.getAckRequestIdentifier(); if (f !== 0) { writer.writeUint64( 2, f ); } f = message.getSrcChainId(); if (f.length > 0) { writer.writeString( 3, f ); } f = message.getDestChainId(); if (f.length > 0) { writer.writeString( 4, f ); } f = message.getRequestSender(); if (f.length > 0) { writer.writeString( 5, f ); } f = message.getExecData_asU8(); if (f.length > 0) { writer.writeBytes( 6, f ); } f = message.getExecStatus(); if (f) { writer.writeBool( 7, f ); } f = message.getBlockHeight(); if (f !== 0) { writer.writeUint64( 8, f ); } }; /** * optional uint64 request_identifier = 1; * @return {number} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getRequestIdentifier = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.setRequestIdentifier = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; /** * optional uint64 ack_request_identifier = 2; * @return {number} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getAckRequestIdentifier = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.setAckRequestIdentifier = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; /** * optional string src_chain_id = 3; * @return {string} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getSrcChainId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.setSrcChainId = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** * optional string dest_chain_id = 4; * @return {string} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getDestChainId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.setDestChainId = function(value) { return jspb.Message.setProto3StringField(this, 4, value); }; /** * optional string request_sender = 5; * @return {string} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getRequestSender = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.setRequestSender = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional bytes exec_data = 6; * @return {!(string|Uint8Array)} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getExecData = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * optional bytes exec_data = 6; * This is a type-conversion wrapper around `getExecData()` * @return {string} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getExecData_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getExecData())); }; /** * optional bytes exec_data = 6; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getExecData()` * @return {!Uint8Array} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getExecData_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getExecData())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.setExecData = function(value) { return jspb.Message.setProto3BytesField(this, 6, value); }; /** * optional bool exec_status = 7; * @return {boolean} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getExecStatus = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); }; /** * @param {boolean} value * @return {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.setExecStatus = function(value) { return jspb.Message.setProto3BooleanField(this, 7, value); }; /** * optional uint64 block_height = 8; * @return {number} */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.getBlockHeight = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.crosschain.AckRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.AckRequestPayload.prototype.setBlockHeight = function(value) { return jspb.Message.setProto3IntField(this, 8, 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.routerprotocol.routerchain.crosschain.RequestPayload.prototype.toObject = function(opt_includeInstance) { return proto.routerprotocol.routerchain.crosschain.RequestPayload.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.routerprotocol.routerchain.crosschain.RequestPayload} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.crosschain.RequestPayload.toObject = function(includeInstance, msg) { var f, obj = { routeAmount: jspb.Message.getFieldWithDefault(msg, 1, ""), routeRecipient: jspb.Message.getFieldWithDefault(msg, 2, ""), requestIdentifier: jspb.Message.getFieldWithDefault(msg, 3, 0), requestTimestamp: jspb.Message.getFieldWithDefault(msg, 4, 0), asmAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), srcChainId: jspb.Message.getFieldWithDefault(msg, 6, ""), destChainId: jspb.Message.getFieldWithDefault(msg, 7, ""), requestSender: jspb.Message.getFieldWithDefault(msg, 8, ""), handlerAddress: jspb.Message.getFieldWithDefault(msg, 9, ""), requestPacket: msg.getRequestPacket_asB64(), isReadCall: jspb.Message.getBooleanFieldWithDefault(msg, 11, false) }; if (includeInstance) { obj.$jspbMessageInstance = msg; } return obj; }; } /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.routerprotocol.routerchain.crosschain.RequestPayload; return proto.routerprotocol.routerchain.crosschain.RequestPayload.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routerprotocol.routerchain.crosschain.RequestPayload} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.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.setRouteAmount(value); break; case 2: var value = /** @type {string} */ (reader.readString()); msg.setRouteRecipient(value); break; case 3: var value = /** @type {number} */ (reader.readUint64()); msg.setRequestIdentifier(value); break; case 4: var value = /** @type {number} */ (reader.readUint64()); msg.setRequestTimestamp(value); break; case 5: var value = /** @type {string} */ (reader.readString()); msg.setAsmAddress(value); break; case 6: var value = /** @type {string} */ (reader.readString()); msg.setSrcChainId(value); break; case 7: var value = /** @type {string} */ (reader.readString()); msg.setDestChainId(value); break; case 8: var value = /** @type {string} */ (reader.readString()); msg.setRequestSender(value); break; case 9: var value = /** @type {string} */ (reader.readString()); msg.setHandlerAddress(value); break; case 10: var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setRequestPacket(value); break; case 11: var value = /** @type {boolean} */ (reader.readBool()); msg.setIsReadCall(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.routerprotocol.routerchain.crosschain.RequestPayload.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.routerprotocol.routerchain.crosschain.RequestPayload} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.crosschain.RequestPayload.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRouteAmount(); if (f.length > 0) { writer.writeString( 1, f ); } f = message.getRouteRecipient(); if (f.length > 0) { writer.writeString( 2, f ); } f = message.getRequestIdentifier(); if (f !== 0) { writer.writeUint64( 3, f ); } f = message.getRequestTimestamp(); if (f !== 0) { writer.writeUint64( 4, f ); } f = message.getAsmAddress(); if (f.length > 0) { writer.writeString( 5, f ); } f = message.getSrcChainId(); if (f.length > 0) { writer.writeString( 6, f ); } f = message.getDestChainId(); if (f.length > 0) { writer.writeString( 7, f ); } f = message.getRequestSender(); if (f.length > 0) { writer.writeString( 8, f ); } f = message.getHandlerAddress(); if (f.length > 0) { writer.writeString( 9, f ); } f = message.getRequestPacket_asU8(); if (f.length > 0) { writer.writeBytes( 10, f ); } f = message.getIsReadCall(); if (f) { writer.writeBool( 11, f ); } }; /** * optional string route_amount = 1; * @return {string} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getRouteAmount = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setRouteAmount = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** * optional string route_recipient = 2; * @return {string} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getRouteRecipient = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setRouteRecipient = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** * optional uint64 request_identifier = 3; * @return {number} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getRequestIdentifier = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setRequestIdentifier = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional uint64 request_timestamp = 4; * @return {number} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getRequestTimestamp = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setRequestTimestamp = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; /** * optional string asm_address = 5; * @return {string} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getAsmAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setAsmAddress = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; /** * optional string src_chain_id = 6; * @return {string} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getSrcChainId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setSrcChainId = function(value) { return jspb.Message.setProto3StringField(this, 6, value); }; /** * optional string dest_chain_id = 7; * @return {string} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getDestChainId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setDestChainId = function(value) { return jspb.Message.setProto3StringField(this, 7, value); }; /** * optional string request_sender = 8; * @return {string} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getRequestSender = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setRequestSender = function(value) { return jspb.Message.setProto3StringField(this, 8, value); }; /** * optional string handler_address = 9; * @return {string} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getHandlerAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; /** * @param {string} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setHandlerAddress = function(value) { return jspb.Message.setProto3StringField(this, 9, value); }; /** * optional bytes request_packet = 10; * @return {!(string|Uint8Array)} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getRequestPacket = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; /** * optional bytes request_packet = 10; * This is a type-conversion wrapper around `getRequestPacket()` * @return {string} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getRequestPacket_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getRequestPacket())); }; /** * optional bytes request_packet = 10; * Note that Uint8Array is not supported on all browsers. * @see http://caniuse.com/Uint8Array * This is a type-conversion wrapper around `getRequestPacket()` * @return {!Uint8Array} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getRequestPacket_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getRequestPacket())); }; /** * @param {!(string|Uint8Array)} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setRequestPacket = function(value) { return jspb.Message.setProto3BytesField(this, 10, value); }; /** * optional bool is_read_call = 11; * @return {boolean} */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.getIsReadCall = function() { return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); }; /** * @param {boolean} value * @return {!proto.routerprotocol.routerchain.crosschain.RequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.RequestPayload.prototype.setIsReadCall = function(value) { return jspb.Message.setProto3BooleanField(this, 11, 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.routerprotocol.routerchain.crosschain.IBCRequestPayload.oneofGroups_ = [[1,2]]; /** * @enum {number} */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.SendCase = { SEND_NOT_SET: 0, REQUEST_PAYLOAD: 1, ACK_REQUEST_PAYLOAD: 2 }; /** * @return {proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.SendCase} */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.getSendCase = function() { return /** @type {proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.SendCase} */(jspb.Message.computeOneofCase(this, proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.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.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.toObject = function(opt_includeInstance) { return proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.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.routerprotocol.routerchain.crosschain.IBCRequestPayload} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.toObject = function(includeInstance, msg) { var f, obj = { requestPayload: (f = msg.getRequestPayload()) && proto.routerprotocol.routerchain.crosschain.RequestPayload.toObject(includeInstance, f), ackRequestPayload: (f = msg.getAckRequestPayload()) && proto.routerprotocol.routerchain.crosschain.AckRequestPayload.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.routerprotocol.routerchain.crosschain.IBCRequestPayload} */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.routerprotocol.routerchain.crosschain.IBCRequestPayload; return proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.routerprotocol.routerchain.crosschain.IBCRequestPayload} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.routerprotocol.routerchain.crosschain.IBCRequestPayload} */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new proto.routerprotocol.routerchain.crosschain.RequestPayload; reader.readMessage(value,proto.routerprotocol.routerchain.crosschain.RequestPayload.deserializeBinaryFromReader); msg.setRequestPayload(value); break; case 2: var value = new proto.routerprotocol.routerchain.crosschain.AckRequestPayload; reader.readMessage(value,proto.routerprotocol.routerchain.crosschain.AckRequestPayload.deserializeBinaryFromReader); msg.setAckRequestPayload(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. * @param {!proto.routerprotocol.routerchain.crosschain.IBCRequestPayload} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getRequestPayload(); if (f != null) { writer.writeMessage( 1, f, proto.routerprotocol.routerchain.crosschain.RequestPayload.serializeBinaryToWriter ); } f = message.getAckRequestPayload(); if (f != null) { writer.writeMessage( 2, f, proto.routerprotocol.routerchain.crosschain.AckRequestPayload.serializeBinaryToWriter ); } }; /** * optional RequestPayload request_payload = 1; * @return {?proto.routerprotocol.routerchain.crosschain.RequestPayload} */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.getRequestPayload = function() { return /** @type{?proto.routerprotocol.routerchain.crosschain.RequestPayload} */ ( jspb.Message.getWrapperField(this, proto.routerprotocol.routerchain.crosschain.RequestPayload, 1)); }; /** * @param {?proto.routerprotocol.routerchain.crosschain.RequestPayload|undefined} value * @return {!proto.routerprotocol.routerchain.crosschain.IBCRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.setRequestPayload = function(value) { return jspb.Message.setOneofWrapperField(this, 1, proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.routerprotocol.routerchain.crosschain.IBCRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.clearRequestPayload = function() { return this.setRequestPayload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.hasRequestPayload = function() { return jspb.Message.getField(this, 1) != null; }; /** * optional AckRequestPayload ack_request_payload = 2; * @return {?proto.routerprotocol.routerchain.crosschain.AckRequestPayload} */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.getAckRequestPayload = function() { return /** @type{?proto.routerprotocol.routerchain.crosschain.AckRequestPayload} */ ( jspb.Message.getWrapperField(this, proto.routerprotocol.routerchain.crosschain.AckRequestPayload, 2)); }; /** * @param {?proto.routerprotocol.routerchain.crosschain.AckRequestPayload|undefined} value * @return {!proto.routerprotocol.routerchain.crosschain.IBCRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.setAckRequestPayload = function(value) { return jspb.Message.setOneofWrapperField(this, 2, proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. * @return {!proto.routerprotocol.routerchain.crosschain.IBCRequestPayload} returns this */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.clearAckRequestPayload = function() { return this.setAckRequestPayload(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.routerprotocol.routerchain.crosschain.IBCRequestPayload.prototype.hasAckRequestPayload = function() { return jspb.Message.getField(this, 2) != null; }; goog.object.extend(exports, proto.routerprotocol.routerchain.crosschain);