proteus-js-client
Version:
Proteus JavaScript Client
283 lines (259 loc) • 9.91 kB
JavaScript
;
/**
* @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')();
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
var rsocket_options_pb = require('../rsocket/options_pb.js');
goog.exportSymbol('proto.io.rsocket.rpc.SimpleRequest', null, global);
goog.exportSymbol('proto.io.rsocket.rpc.SimpleResponse', 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.rsocket.rpc.SimpleRequest = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.io.rsocket.rpc.SimpleRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.io.rsocket.rpc.SimpleRequest.displayName = 'proto.io.rsocket.rpc.SimpleRequest';
}
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.rsocket.rpc.SimpleRequest.prototype.toObject = function (opt_includeInstance) {
return proto.io.rsocket.rpc.SimpleRequest.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.rsocket.rpc.SimpleRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.io.rsocket.rpc.SimpleRequest.toObject = function (includeInstance, msg) {
var f,
obj = {
requestmessage: 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.io.rsocket.rpc.SimpleRequest}
*/
proto.io.rsocket.rpc.SimpleRequest.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.io.rsocket.rpc.SimpleRequest();
return proto.io.rsocket.rpc.SimpleRequest.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.io.rsocket.rpc.SimpleRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.io.rsocket.rpc.SimpleRequest}
*/
proto.io.rsocket.rpc.SimpleRequest.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.setRequestmessage(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.io.rsocket.rpc.SimpleRequest.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.io.rsocket.rpc.SimpleRequest.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.rsocket.rpc.SimpleRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.io.rsocket.rpc.SimpleRequest.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getRequestmessage();
if (f.length > 0) {
writer.writeString(1, f);
}
};
/**
* optional string requestMessage = 1;
* @return {string}
*/
proto.io.rsocket.rpc.SimpleRequest.prototype.getRequestmessage = function () {
return (/** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/** @param {string} value */
proto.io.rsocket.rpc.SimpleRequest.prototype.setRequestmessage = function (value) {
jspb.Message.setProto3StringField(this, 1, value);
};
/**
* 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.rsocket.rpc.SimpleResponse = function (opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.io.rsocket.rpc.SimpleResponse, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.io.rsocket.rpc.SimpleResponse.displayName = 'proto.io.rsocket.rpc.SimpleResponse';
}
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.rsocket.rpc.SimpleResponse.prototype.toObject = function (opt_includeInstance) {
return proto.io.rsocket.rpc.SimpleResponse.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.rsocket.rpc.SimpleResponse} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.io.rsocket.rpc.SimpleResponse.toObject = function (includeInstance, msg) {
var f,
obj = {
responsemessage: 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.io.rsocket.rpc.SimpleResponse}
*/
proto.io.rsocket.rpc.SimpleResponse.deserializeBinary = function (bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.io.rsocket.rpc.SimpleResponse();
return proto.io.rsocket.rpc.SimpleResponse.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.io.rsocket.rpc.SimpleResponse} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.io.rsocket.rpc.SimpleResponse}
*/
proto.io.rsocket.rpc.SimpleResponse.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.setResponsemessage(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.io.rsocket.rpc.SimpleResponse.prototype.serializeBinary = function () {
var writer = new jspb.BinaryWriter();
proto.io.rsocket.rpc.SimpleResponse.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.rsocket.rpc.SimpleResponse} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.io.rsocket.rpc.SimpleResponse.serializeBinaryToWriter = function (message, writer) {
var f = undefined;
f = message.getResponsemessage();
if (f.length > 0) {
writer.writeString(1, f);
}
};
/**
* optional string responseMessage = 1;
* @return {string}
*/
proto.io.rsocket.rpc.SimpleResponse.prototype.getResponsemessage = function () {
return (/** @type {string} */jspb.Message.getFieldWithDefault(this, 1, "")
);
};
/** @param {string} value */
proto.io.rsocket.rpc.SimpleResponse.prototype.setResponsemessage = function (value) {
jspb.Message.setProto3StringField(this, 1, value);
};
goog.object.extend(exports, proto.io.rsocket.rpc);