@dojima-wallet/operator-gateway
Version:
Operator gateway client involving dojima stack
374 lines (348 loc) • 11.4 kB
JavaScript
// source: operator.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 query_pb = require("./query_pb.js");
goog.object.extend(proto, query_pb);
goog.exportSymbol("proto.AddChainClientRequest", null, global);
goog.exportSymbol("proto.AddChainClientResponse", 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.AddChainClientRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.AddChainClientRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.AddChainClientRequest.displayName = "proto.AddChainClientRequest";
}
/**
* 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.AddChainClientResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.AddChainClientResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.AddChainClientResponse.displayName = "proto.AddChainClientResponse";
}
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.AddChainClientRequest.prototype.toObject = function (
opt_includeInstance
) {
return proto.AddChainClientRequest.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.AddChainClientRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.AddChainClientRequest.toObject = function (includeInstance, msg) {
var f,
obj = {
chain:
(f = msg.getChain()) && query_pb.Chain.toObject(includeInstance, f),
rpchost: jspb.Message.getFieldWithDefault(msg, 2, ""),
wshost: jspb.Message.getFieldWithDefault(msg, 3, ""),
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.AddChainClientRequest}
*/
proto.AddChainClientRequest.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.AddChainClientRequest();
return proto.AddChainClientRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.AddChainClientRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.AddChainClientRequest}
*/
proto.AddChainClientRequest.deserializeBinaryFromReader = function (
msg,
reader
) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new query_pb.Chain();
reader.readMessage(value, query_pb.Chain.deserializeBinaryFromReader);
msg.setChain(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setRpchost(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setWshost(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.AddChainClientRequest.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.AddChainClientRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.AddChainClientRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.AddChainClientRequest.serializeBinaryToWriter = function (
message,
writer
) {
var f = undefined;
f = message.getChain();
if (f != null) {
writer.writeMessage(1, f, query_pb.Chain.serializeBinaryToWriter);
}
f = message.getRpchost();
if (f.length > 0) {
writer.writeString(2, f);
}
f = message.getWshost();
if (f.length > 0) {
writer.writeString(3, f);
}
};
/**
* optional Chain chain = 1;
* @return {?proto.Chain}
*/
proto.AddChainClientRequest.prototype.getChain = function () {
return /** @type{?proto.Chain} */ (
jspb.Message.getWrapperField(this, query_pb.Chain, 1)
);
};
/**
* @param {?proto.Chain|undefined} value
* @return {!proto.AddChainClientRequest} returns this
*/
proto.AddChainClientRequest.prototype.setChain = function (value) {
return jspb.Message.setWrapperField(this, 1, value);
};
/**
* Clears the message field making it undefined.
* @return {!proto.AddChainClientRequest} returns this
*/
proto.AddChainClientRequest.prototype.clearChain = function () {
return this.setChain(undefined);
};
/**
* Returns whether this field is set.
* @return {boolean}
*/
proto.AddChainClientRequest.prototype.hasChain = function () {
return jspb.Message.getField(this, 1) != null;
};
/**
* optional string rpcHost = 2;
* @return {string}
*/
proto.AddChainClientRequest.prototype.getRpchost = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.AddChainClientRequest} returns this
*/
proto.AddChainClientRequest.prototype.setRpchost = function (value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string wsHost = 3;
* @return {string}
*/
proto.AddChainClientRequest.prototype.getWshost = function () {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.AddChainClientRequest} returns this
*/
proto.AddChainClientRequest.prototype.setWshost = function (value) {
return jspb.Message.setProto3StringField(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.AddChainClientResponse.prototype.toObject = function (
opt_includeInstance
) {
return proto.AddChainClientResponse.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.AddChainClientResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.AddChainClientResponse.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.AddChainClientResponse}
*/
proto.AddChainClientResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.AddChainClientResponse();
return proto.AddChainClientResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.AddChainClientResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.AddChainClientResponse}
*/
proto.AddChainClientResponse.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.AddChainClientResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.AddChainClientResponse.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.AddChainClientResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.AddChainClientResponse.serializeBinaryToWriter = function (
message,
writer
) {
var f = undefined;
};
goog.object.extend(exports, proto);