diff --git a/package-lock.json b/package-lock.json index df035d5..5a48a6a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "dependencies": { "@mdi/font": "5.9.55", "core-js": "^3.8.3", + "google-protobuf": "^3.20.1", "protobufjs": "^6.11.3", "roboto-fontface": "*", "vue": "^3.2.13", @@ -6808,6 +6809,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/google-protobuf": { + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.20.1.tgz", + "integrity": "sha512-XMf1+O32FjYIV3CYu6Tuh5PNbfNEU5Xu22X+Xkdb/DUexFlCzhvv7d5Iirm4AOwn8lv4al1YvIhzGrg2j9Zfzw==" + }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -17377,6 +17383,11 @@ "slash": "^3.0.0" } }, + "google-protobuf": { + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.20.1.tgz", + "integrity": "sha512-XMf1+O32FjYIV3CYu6Tuh5PNbfNEU5Xu22X+Xkdb/DUexFlCzhvv7d5Iirm4AOwn8lv4al1YvIhzGrg2j9Zfzw==" + }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmmirror.com/graceful-fs/-/graceful-fs-4.2.10.tgz", diff --git a/package.json b/package.json index 18e0c8c..bff96b0 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "dependencies": { "@mdi/font": "5.9.55", "core-js": "^3.8.3", + "google-protobuf": "^3.20.1", "protobufjs": "^6.11.3", "roboto-fontface": "*", "vue": "^3.2.13", diff --git a/pb.bat b/pb.bat index 1bacdf6..b1d22b9 100644 --- a/pb.bat +++ b/pb.bat @@ -7,11 +7,13 @@ set PROJECT_ROOT=. set SRC=%PROJECT_ROOT%\src\pb\proto set TAR=%PROJECT_ROOT%\src\pb\js -protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\*.proto -protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\notify\*.proto -protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\user\*.proto -protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\friend\*.proto -protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\pack\*.proto -protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\mail\*.proto +@REM protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\*.proto +@REM protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\notify\*.proto +@REM protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\user\*.proto +@REM protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\friend\*.proto +@REM protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\pack\*.proto +@REM protoc --proto_path=%SRC% --js_out=import_style=commonjs,binary:%TAR%\. %SRC%\mail\*.proto + +npx pbjs -t json-module -w commonjs -o src/pb/proto.js %SRC%\*.proto pause \ No newline at end of file diff --git a/src/pb/js/comm_pb.js b/src/pb/js/comm_pb.js deleted file mode 100644 index 712e859..0000000 --- a/src/pb/js/comm_pb.js +++ /dev/null @@ -1,2121 +0,0 @@ -// source: comm.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 || window || global || self || Function('return this')(); }).call(null); - -var errorcode_pb = require('./errorcode_pb.js'); -goog.object.extend(proto, errorcode_pb); -var google_protobuf_any_pb = require('google-protobuf/google/protobuf/any_pb.js'); -goog.object.extend(proto, google_protobuf_any_pb); -goog.exportSymbol('proto.AgentBuildReq', null, global); -goog.exportSymbol('proto.AgentCloseeReq', null, global); -goog.exportSymbol('proto.AgentMessage', null, global); -goog.exportSymbol('proto.AgentSendMessageReq', null, global); -goog.exportSymbol('proto.AgentUnBuildReq', null, global); -goog.exportSymbol('proto.BatchMessageReq', null, global); -goog.exportSymbol('proto.BroadCastMessageReq', null, global); -goog.exportSymbol('proto.RPCMessageReply', null, global); -goog.exportSymbol('proto.UserMessage', 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.UserMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.UserMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.UserMessage.displayName = 'proto.UserMessage'; -} -/** - * 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.AgentMessage = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.AgentMessage, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.AgentMessage.displayName = 'proto.AgentMessage'; -} -/** - * 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.RPCMessageReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.RPCMessageReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.RPCMessageReply.displayName = 'proto.RPCMessageReply'; -} -/** - * 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.AgentBuildReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.AgentBuildReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.AgentBuildReq.displayName = 'proto.AgentBuildReq'; -} -/** - * 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.AgentUnBuildReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.AgentUnBuildReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.AgentUnBuildReq.displayName = 'proto.AgentUnBuildReq'; -} -/** - * 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.AgentSendMessageReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.AgentSendMessageReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.AgentSendMessageReq.displayName = 'proto.AgentSendMessageReq'; -} -/** - * 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.BatchMessageReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.BatchMessageReq.repeatedFields_, null); -}; -goog.inherits(proto.BatchMessageReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.BatchMessageReq.displayName = 'proto.BatchMessageReq'; -} -/** - * 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.BroadCastMessageReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.BroadCastMessageReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.BroadCastMessageReq.displayName = 'proto.BroadCastMessageReq'; -} -/** - * 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.AgentCloseeReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.AgentCloseeReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.AgentCloseeReq.displayName = 'proto.AgentCloseeReq'; -} - - - -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_, 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.UserMessage.prototype.toObject = function(opt_includeInstance) { - return proto.UserMessage.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.UserMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserMessage.toObject = function(includeInstance, msg) { - var f, obj = { - maintype: jspb.Message.getFieldWithDefault(msg, 1, ""), - subtype: jspb.Message.getFieldWithDefault(msg, 2, ""), - data: (f = msg.getData()) && google_protobuf_any_pb.Any.toObject(includeInstance, f), - sec: 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.UserMessage} - */ -proto.UserMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.UserMessage; - return proto.UserMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.UserMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.UserMessage} - */ -proto.UserMessage.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.setMaintype(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSubtype(value); - break; - case 3: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setData(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSec(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.UserMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.UserMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.UserMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMaintype(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSubtype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getData(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } - f = message.getSec(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - - -/** - * optional string MainType = 1; - * @return {string} - */ -proto.UserMessage.prototype.getMaintype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.UserMessage} returns this - */ -proto.UserMessage.prototype.setMaintype = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string SubType = 2; - * @return {string} - */ -proto.UserMessage.prototype.getSubtype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.UserMessage} returns this - */ -proto.UserMessage.prototype.setSubtype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Any data = 3; - * @return {?proto.google.protobuf.Any} - */ -proto.UserMessage.prototype.getData = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.UserMessage} returns this -*/ -proto.UserMessage.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.UserMessage} returns this - */ -proto.UserMessage.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.UserMessage.prototype.hasData = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional string sec = 4; - * @return {string} - */ -proto.UserMessage.prototype.getSec = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.UserMessage} returns this - */ -proto.UserMessage.prototype.setSec = function(value) { - return jspb.Message.setProto3StringField(this, 4, 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_, 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.AgentMessage.prototype.toObject = function(opt_includeInstance) { - return proto.AgentMessage.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.AgentMessage} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentMessage.toObject = function(includeInstance, msg) { - var f, obj = { - ip: jspb.Message.getFieldWithDefault(msg, 1, ""), - usersessionid: jspb.Message.getFieldWithDefault(msg, 2, ""), - userid: jspb.Message.getFieldWithDefault(msg, 3, ""), - gatewayserviceid: jspb.Message.getFieldWithDefault(msg, 4, ""), - method: jspb.Message.getFieldWithDefault(msg, 5, ""), - message: (f = msg.getMessage()) && google_protobuf_any_pb.Any.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.AgentMessage} - */ -proto.AgentMessage.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AgentMessage; - return proto.AgentMessage.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AgentMessage} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AgentMessage} - */ -proto.AgentMessage.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.setIp(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUsersessionid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setGatewayserviceid(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setMethod(value); - break; - case 6: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.AgentMessage.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AgentMessage.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AgentMessage} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentMessage.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getIp(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUsersessionid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getGatewayserviceid(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getMessage(); - if (f != null) { - writer.writeMessage( - 6, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string Ip = 1; - * @return {string} - */ -proto.AgentMessage.prototype.getIp = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentMessage} returns this - */ -proto.AgentMessage.prototype.setIp = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string UserSessionId = 2; - * @return {string} - */ -proto.AgentMessage.prototype.getUsersessionid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentMessage} returns this - */ -proto.AgentMessage.prototype.setUsersessionid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string UserId = 3; - * @return {string} - */ -proto.AgentMessage.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentMessage} returns this - */ -proto.AgentMessage.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string GatewayServiceId = 4; - * @return {string} - */ -proto.AgentMessage.prototype.getGatewayserviceid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentMessage} returns this - */ -proto.AgentMessage.prototype.setGatewayserviceid = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string Method = 5; - * @return {string} - */ -proto.AgentMessage.prototype.getMethod = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentMessage} returns this - */ -proto.AgentMessage.prototype.setMethod = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional google.protobuf.Any Message = 6; - * @return {?proto.google.protobuf.Any} - */ -proto.AgentMessage.prototype.getMessage = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 6)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.AgentMessage} returns this -*/ -proto.AgentMessage.prototype.setMessage = function(value) { - return jspb.Message.setWrapperField(this, 6, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.AgentMessage} returns this - */ -proto.AgentMessage.prototype.clearMessage = function() { - return this.setMessage(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.AgentMessage.prototype.hasMessage = function() { - return jspb.Message.getField(this, 6) != null; -}; - - - - - -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_, 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.RPCMessageReply.prototype.toObject = function(opt_includeInstance) { - return proto.RPCMessageReply.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.RPCMessageReply} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.RPCMessageReply.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - data: 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.RPCMessageReply} - */ -proto.RPCMessageReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.RPCMessageReply; - return proto.RPCMessageReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.RPCMessageReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.RPCMessageReply} - */ -proto.RPCMessageReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.ErrorCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.RPCMessageReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.RPCMessageReply.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.RPCMessageReply} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.RPCMessageReply.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getData(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional ErrorCode Code = 1; - * @return {!proto.ErrorCode} - */ -proto.RPCMessageReply.prototype.getCode = function() { - return /** @type {!proto.ErrorCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.ErrorCode} value - * @return {!proto.RPCMessageReply} returns this - */ -proto.RPCMessageReply.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string Message = 2; - * @return {string} - */ -proto.RPCMessageReply.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.RPCMessageReply} returns this - */ -proto.RPCMessageReply.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string Data = 3; - * @return {string} - */ -proto.RPCMessageReply.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.RPCMessageReply} returns this - */ -proto.RPCMessageReply.prototype.setData = 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_, 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.AgentBuildReq.prototype.toObject = function(opt_includeInstance) { - return proto.AgentBuildReq.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.AgentBuildReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentBuildReq.toObject = function(includeInstance, msg) { - var f, obj = { - usersessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), - userid: jspb.Message.getFieldWithDefault(msg, 2, ""), - workerid: 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.AgentBuildReq} - */ -proto.AgentBuildReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AgentBuildReq; - return proto.AgentBuildReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AgentBuildReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AgentBuildReq} - */ -proto.AgentBuildReq.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.setUsersessionid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setWorkerid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.AgentBuildReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AgentBuildReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AgentBuildReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentBuildReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUsersessionid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getWorkerid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string UserSessionId = 1; - * @return {string} - */ -proto.AgentBuildReq.prototype.getUsersessionid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentBuildReq} returns this - */ -proto.AgentBuildReq.prototype.setUsersessionid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string UserId = 2; - * @return {string} - */ -proto.AgentBuildReq.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentBuildReq} returns this - */ -proto.AgentBuildReq.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string WorkerId = 3; - * @return {string} - */ -proto.AgentBuildReq.prototype.getWorkerid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentBuildReq} returns this - */ -proto.AgentBuildReq.prototype.setWorkerid = 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_, 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.AgentUnBuildReq.prototype.toObject = function(opt_includeInstance) { - return proto.AgentUnBuildReq.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.AgentUnBuildReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentUnBuildReq.toObject = function(includeInstance, msg) { - var f, obj = { - usersessionid: 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.AgentUnBuildReq} - */ -proto.AgentUnBuildReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AgentUnBuildReq; - return proto.AgentUnBuildReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AgentUnBuildReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AgentUnBuildReq} - */ -proto.AgentUnBuildReq.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.setUsersessionid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.AgentUnBuildReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AgentUnBuildReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AgentUnBuildReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentUnBuildReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUsersessionid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string UserSessionId = 1; - * @return {string} - */ -proto.AgentUnBuildReq.prototype.getUsersessionid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentUnBuildReq} returns this - */ -proto.AgentUnBuildReq.prototype.setUsersessionid = 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_, 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.AgentSendMessageReq.prototype.toObject = function(opt_includeInstance) { - return proto.AgentSendMessageReq.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.AgentSendMessageReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentSendMessageReq.toObject = function(includeInstance, msg) { - var f, obj = { - usersessionid: jspb.Message.getFieldWithDefault(msg, 1, ""), - maintype: jspb.Message.getFieldWithDefault(msg, 2, ""), - subtype: jspb.Message.getFieldWithDefault(msg, 3, ""), - data: (f = msg.getData()) && google_protobuf_any_pb.Any.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.AgentSendMessageReq} - */ -proto.AgentSendMessageReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AgentSendMessageReq; - return proto.AgentSendMessageReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AgentSendMessageReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AgentSendMessageReq} - */ -proto.AgentSendMessageReq.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.setUsersessionid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMaintype(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSubtype(value); - break; - case 4: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.AgentSendMessageReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AgentSendMessageReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AgentSendMessageReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentSendMessageReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUsersessionid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getMaintype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSubtype(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getData(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string UserSessionId = 1; - * @return {string} - */ -proto.AgentSendMessageReq.prototype.getUsersessionid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentSendMessageReq} returns this - */ -proto.AgentSendMessageReq.prototype.setUsersessionid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string MainType = 2; - * @return {string} - */ -proto.AgentSendMessageReq.prototype.getMaintype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentSendMessageReq} returns this - */ -proto.AgentSendMessageReq.prototype.setMaintype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string SubType = 3; - * @return {string} - */ -proto.AgentSendMessageReq.prototype.getSubtype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentSendMessageReq} returns this - */ -proto.AgentSendMessageReq.prototype.setSubtype = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional google.protobuf.Any Data = 4; - * @return {?proto.google.protobuf.Any} - */ -proto.AgentSendMessageReq.prototype.getData = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.AgentSendMessageReq} returns this -*/ -proto.AgentSendMessageReq.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.AgentSendMessageReq} returns this - */ -proto.AgentSendMessageReq.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.AgentSendMessageReq.prototype.hasData = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.BatchMessageReq.repeatedFields_ = [1]; - - - -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_, 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.BatchMessageReq.prototype.toObject = function(opt_includeInstance) { - return proto.BatchMessageReq.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.BatchMessageReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.BatchMessageReq.toObject = function(includeInstance, msg) { - var f, obj = { - usersessionidsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - maintype: jspb.Message.getFieldWithDefault(msg, 2, ""), - subtype: jspb.Message.getFieldWithDefault(msg, 3, ""), - data: (f = msg.getData()) && google_protobuf_any_pb.Any.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.BatchMessageReq} - */ -proto.BatchMessageReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.BatchMessageReq; - return proto.BatchMessageReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.BatchMessageReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.BatchMessageReq} - */ -proto.BatchMessageReq.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.addUsersessionids(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMaintype(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSubtype(value); - break; - case 4: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.BatchMessageReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.BatchMessageReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.BatchMessageReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.BatchMessageReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUsersessionidsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } - f = message.getMaintype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSubtype(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getData(); - if (f != null) { - writer.writeMessage( - 4, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated string UserSessionIds = 1; - * @return {!Array} - */ -proto.BatchMessageReq.prototype.getUsersessionidsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.BatchMessageReq} returns this - */ -proto.BatchMessageReq.prototype.setUsersessionidsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.BatchMessageReq} returns this - */ -proto.BatchMessageReq.prototype.addUsersessionids = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.BatchMessageReq} returns this - */ -proto.BatchMessageReq.prototype.clearUsersessionidsList = function() { - return this.setUsersessionidsList([]); -}; - - -/** - * optional string MainType = 2; - * @return {string} - */ -proto.BatchMessageReq.prototype.getMaintype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.BatchMessageReq} returns this - */ -proto.BatchMessageReq.prototype.setMaintype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string SubType = 3; - * @return {string} - */ -proto.BatchMessageReq.prototype.getSubtype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.BatchMessageReq} returns this - */ -proto.BatchMessageReq.prototype.setSubtype = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional google.protobuf.Any Data = 4; - * @return {?proto.google.protobuf.Any} - */ -proto.BatchMessageReq.prototype.getData = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 4)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.BatchMessageReq} returns this -*/ -proto.BatchMessageReq.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.BatchMessageReq} returns this - */ -proto.BatchMessageReq.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.BatchMessageReq.prototype.hasData = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - - - -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_, 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.BroadCastMessageReq.prototype.toObject = function(opt_includeInstance) { - return proto.BroadCastMessageReq.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.BroadCastMessageReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.BroadCastMessageReq.toObject = function(includeInstance, msg) { - var f, obj = { - maintype: jspb.Message.getFieldWithDefault(msg, 1, ""), - subtype: jspb.Message.getFieldWithDefault(msg, 2, ""), - data: (f = msg.getData()) && google_protobuf_any_pb.Any.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.BroadCastMessageReq} - */ -proto.BroadCastMessageReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.BroadCastMessageReq; - return proto.BroadCastMessageReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.BroadCastMessageReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.BroadCastMessageReq} - */ -proto.BroadCastMessageReq.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.setMaintype(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSubtype(value); - break; - case 3: - var value = new google_protobuf_any_pb.Any; - reader.readMessage(value,google_protobuf_any_pb.Any.deserializeBinaryFromReader); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.BroadCastMessageReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.BroadCastMessageReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.BroadCastMessageReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.BroadCastMessageReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMaintype(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSubtype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getData(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_any_pb.Any.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string MainType = 1; - * @return {string} - */ -proto.BroadCastMessageReq.prototype.getMaintype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.BroadCastMessageReq} returns this - */ -proto.BroadCastMessageReq.prototype.setMaintype = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string SubType = 2; - * @return {string} - */ -proto.BroadCastMessageReq.prototype.getSubtype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.BroadCastMessageReq} returns this - */ -proto.BroadCastMessageReq.prototype.setSubtype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional google.protobuf.Any Data = 3; - * @return {?proto.google.protobuf.Any} - */ -proto.BroadCastMessageReq.prototype.getData = function() { - return /** @type{?proto.google.protobuf.Any} */ ( - jspb.Message.getWrapperField(this, google_protobuf_any_pb.Any, 3)); -}; - - -/** - * @param {?proto.google.protobuf.Any|undefined} value - * @return {!proto.BroadCastMessageReq} returns this -*/ -proto.BroadCastMessageReq.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.BroadCastMessageReq} returns this - */ -proto.BroadCastMessageReq.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.BroadCastMessageReq.prototype.hasData = function() { - return jspb.Message.getField(this, 3) != null; -}; - - - - - -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_, 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.AgentCloseeReq.prototype.toObject = function(opt_includeInstance) { - return proto.AgentCloseeReq.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.AgentCloseeReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentCloseeReq.toObject = function(includeInstance, msg) { - var f, obj = { - usersessionid: 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.AgentCloseeReq} - */ -proto.AgentCloseeReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.AgentCloseeReq; - return proto.AgentCloseeReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.AgentCloseeReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.AgentCloseeReq} - */ -proto.AgentCloseeReq.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.setUsersessionid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.AgentCloseeReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.AgentCloseeReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.AgentCloseeReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.AgentCloseeReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUsersessionid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string UserSessionId = 1; - * @return {string} - */ -proto.AgentCloseeReq.prototype.getUsersessionid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.AgentCloseeReq} returns this - */ -proto.AgentCloseeReq.prototype.setUsersessionid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/js/errorcode_pb.js b/src/pb/js/errorcode_pb.js deleted file mode 100644 index 419f508..0000000 --- a/src/pb/js/errorcode_pb.js +++ /dev/null @@ -1,55 +0,0 @@ -// source: errorcode.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 || window || global || self || Function('return this')(); }).call(null); - -goog.exportSymbol('proto.ErrorCode', null, global); -/** - * @enum {number} - */ -proto.ErrorCode = { - SUCCESS: 0, - NOFINDSERVICE: 10, - NOFINDSERVICEHANDLEFUNC: 11, - RPCFUNCEXECUTIONERROR: 12, - CACHEREADERROR: 13, - SQLEXECUTIONERROR: 14, - REQPARAMETERERROR: 15, - SIGNERROR: 16, - INSUFFICIENTPERMISSIONS: 17, - NOLOGIN: 18, - USERSESSIONNOBEING: 19, - STATEINVALID: 20, - DBERROR: 21, - SYSTEMERROR: 22, - EXCEPTION: 100, - SECKEYINVALID: 1000, - SECKEY: 1001, - BINDUSER: 1002, - FRIENDNOTSELF: 1100, - FRIENDSELFMAX: 1101, - FRIENDTARGETMAX: 1102, - FRIENDSELFNODATA: 1103, - FRIENDTARGETNODATA: 1104, - FRIENDYET: 1105, - FRIENDAPPLYYET: 1106, - FRIENDSELFBLACKYET: 1107, - FRIENDTARGETBLACKYET: 1108, - FRIENDAPPLYERROR: 1109, - FRIENDBLACKMAX: 1110, - FRIENDSEARCHNAMEEMPTY: 1111 -}; - -goog.object.extend(exports, proto); diff --git a/src/pb/js/friend/friend_db_pb.js b/src/pb/js/friend/friend_db_pb.js deleted file mode 100644 index a429ae6..0000000 --- a/src/pb/js/friend/friend_db_pb.js +++ /dev/null @@ -1,324 +0,0 @@ -// source: friend/friend_db.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 || window || global || self || Function('return this')(); }).call(null); - -goog.exportSymbol('proto.DB_FriendData', 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.DB_FriendData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.DB_FriendData.repeatedFields_, null); -}; -goog.inherits(proto.DB_FriendData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.DB_FriendData.displayName = 'proto.DB_FriendData'; -} - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.DB_FriendData.repeatedFields_ = [2,3,4]; - - - -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_, 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.DB_FriendData.prototype.toObject = function(opt_includeInstance) { - return proto.DB_FriendData.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.DB_FriendData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.DB_FriendData.toObject = function(includeInstance, msg) { - var f, obj = { - uid: jspb.Message.getFieldWithDefault(msg, 1, ""), - friendidsList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, - applyidsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, - blackidsList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : 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.DB_FriendData} - */ -proto.DB_FriendData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.DB_FriendData; - return proto.DB_FriendData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.DB_FriendData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.DB_FriendData} - */ -proto.DB_FriendData.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.setUid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.addFriendids(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addApplyids(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.addBlackids(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.DB_FriendData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.DB_FriendData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.DB_FriendData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.DB_FriendData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFriendidsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 2, - f - ); - } - f = message.getApplyidsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } - f = message.getBlackidsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 4, - f - ); - } -}; - - -/** - * optional string uId = 1; - * @return {string} - */ -proto.DB_FriendData.prototype.getUid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.setUid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * repeated string friendIds = 2; - * @return {!Array} - */ -proto.DB_FriendData.prototype.getFriendidsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.setFriendidsList = function(value) { - return jspb.Message.setField(this, 2, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.addFriendids = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 2, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.clearFriendidsList = function() { - return this.setFriendidsList([]); -}; - - -/** - * repeated string applyIds = 3; - * @return {!Array} - */ -proto.DB_FriendData.prototype.getApplyidsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.setApplyidsList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.addApplyids = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.clearApplyidsList = function() { - return this.setApplyidsList([]); -}; - - -/** - * repeated string blackIds = 4; - * @return {!Array} - */ -proto.DB_FriendData.prototype.getBlackidsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; - - -/** - * @param {!Array} value - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.setBlackidsList = function(value) { - return jspb.Message.setField(this, 4, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.addBlackids = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.DB_FriendData} returns this - */ -proto.DB_FriendData.prototype.clearBlackidsList = function() { - return this.setBlackidsList([]); -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/js/friend/friend_msg_pb.js b/src/pb/js/friend/friend_msg_pb.js deleted file mode 100644 index d0242fa..0000000 --- a/src/pb/js/friend/friend_msg_pb.js +++ /dev/null @@ -1,4588 +0,0 @@ -// source: friend/friend_msg.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 || window || global || self || Function('return this')(); }).call(null); - -goog.exportSymbol('proto.FriendBase', null, global); -goog.exportSymbol('proto.Friend_Agree_Req', null, global); -goog.exportSymbol('proto.Friend_Agree_Rsp', null, global); -goog.exportSymbol('proto.Friend_ApplyList_Req', null, global); -goog.exportSymbol('proto.Friend_ApplyList_Rsp', null, global); -goog.exportSymbol('proto.Friend_Apply_Req', null, global); -goog.exportSymbol('proto.Friend_Apply_Rsp', null, global); -goog.exportSymbol('proto.Friend_BlackAdd_Req', null, global); -goog.exportSymbol('proto.Friend_BlackAdd_Rsp', null, global); -goog.exportSymbol('proto.Friend_BlackList_Req', null, global); -goog.exportSymbol('proto.Friend_BlackList_Rsp', null, global); -goog.exportSymbol('proto.Friend_DelBlack_Req', null, global); -goog.exportSymbol('proto.Friend_DelBlack_Rsp', null, global); -goog.exportSymbol('proto.Friend_Del_Req', null, global); -goog.exportSymbol('proto.Friend_Del_Rsp', null, global); -goog.exportSymbol('proto.Friend_Give_Req', null, global); -goog.exportSymbol('proto.Friend_Give_Rsp', null, global); -goog.exportSymbol('proto.Friend_List_Req', null, global); -goog.exportSymbol('proto.Friend_List_Rsp', null, global); -goog.exportSymbol('proto.Friend_Receive_Req', null, global); -goog.exportSymbol('proto.Friend_Receive_Rsp', null, global); -goog.exportSymbol('proto.Friend_Refuse_Req', null, global); -goog.exportSymbol('proto.Friend_Refuse_Rsp', null, global); -goog.exportSymbol('proto.Friend_Search_Req', null, global); -goog.exportSymbol('proto.Friend_Search_Rsp', null, global); -goog.exportSymbol('proto.Friend_Total_Req', null, global); -goog.exportSymbol('proto.Friend_Total_Rsp', 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.FriendBase = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.FriendBase, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.FriendBase.displayName = 'proto.FriendBase'; -} -/** - * 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.Friend_List_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_List_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_List_Req.displayName = 'proto.Friend_List_Req'; -} -/** - * 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.Friend_List_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Friend_List_Rsp.repeatedFields_, null); -}; -goog.inherits(proto.Friend_List_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_List_Rsp.displayName = 'proto.Friend_List_Rsp'; -} -/** - * 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.Friend_Apply_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Apply_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Apply_Req.displayName = 'proto.Friend_Apply_Req'; -} -/** - * 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.Friend_Apply_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Apply_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Apply_Rsp.displayName = 'proto.Friend_Apply_Rsp'; -} -/** - * 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.Friend_Del_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Del_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Del_Req.displayName = 'proto.Friend_Del_Req'; -} -/** - * 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.Friend_Del_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Del_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Del_Rsp.displayName = 'proto.Friend_Del_Rsp'; -} -/** - * 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.Friend_Agree_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Friend_Agree_Req.repeatedFields_, null); -}; -goog.inherits(proto.Friend_Agree_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Agree_Req.displayName = 'proto.Friend_Agree_Req'; -} -/** - * 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.Friend_Agree_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Agree_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Agree_Rsp.displayName = 'proto.Friend_Agree_Rsp'; -} -/** - * 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.Friend_Refuse_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Friend_Refuse_Req.repeatedFields_, null); -}; -goog.inherits(proto.Friend_Refuse_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Refuse_Req.displayName = 'proto.Friend_Refuse_Req'; -} -/** - * 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.Friend_Refuse_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Refuse_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Refuse_Rsp.displayName = 'proto.Friend_Refuse_Rsp'; -} -/** - * 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.Friend_ApplyList_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_ApplyList_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_ApplyList_Req.displayName = 'proto.Friend_ApplyList_Req'; -} -/** - * 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.Friend_ApplyList_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Friend_ApplyList_Rsp.repeatedFields_, null); -}; -goog.inherits(proto.Friend_ApplyList_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_ApplyList_Rsp.displayName = 'proto.Friend_ApplyList_Rsp'; -} -/** - * 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.Friend_Search_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Search_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Search_Req.displayName = 'proto.Friend_Search_Req'; -} -/** - * 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.Friend_Search_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Search_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Search_Rsp.displayName = 'proto.Friend_Search_Rsp'; -} -/** - * 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.Friend_BlackList_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_BlackList_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_BlackList_Req.displayName = 'proto.Friend_BlackList_Req'; -} -/** - * 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.Friend_BlackList_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Friend_BlackList_Rsp.repeatedFields_, null); -}; -goog.inherits(proto.Friend_BlackList_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_BlackList_Rsp.displayName = 'proto.Friend_BlackList_Rsp'; -} -/** - * 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.Friend_BlackAdd_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_BlackAdd_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_BlackAdd_Req.displayName = 'proto.Friend_BlackAdd_Req'; -} -/** - * 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.Friend_BlackAdd_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_BlackAdd_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_BlackAdd_Rsp.displayName = 'proto.Friend_BlackAdd_Rsp'; -} -/** - * 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.Friend_DelBlack_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_DelBlack_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_DelBlack_Req.displayName = 'proto.Friend_DelBlack_Req'; -} -/** - * 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.Friend_DelBlack_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_DelBlack_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_DelBlack_Rsp.displayName = 'proto.Friend_DelBlack_Rsp'; -} -/** - * 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.Friend_Receive_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Receive_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Receive_Req.displayName = 'proto.Friend_Receive_Req'; -} -/** - * 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.Friend_Receive_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Receive_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Receive_Rsp.displayName = 'proto.Friend_Receive_Rsp'; -} -/** - * 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.Friend_Give_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Give_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Give_Req.displayName = 'proto.Friend_Give_Req'; -} -/** - * 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.Friend_Give_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Give_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Give_Rsp.displayName = 'proto.Friend_Give_Rsp'; -} -/** - * 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.Friend_Total_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Total_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Total_Req.displayName = 'proto.Friend_Total_Req'; -} -/** - * 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.Friend_Total_Rsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Friend_Total_Rsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Friend_Total_Rsp.displayName = 'proto.Friend_Total_Rsp'; -} - - - -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_, 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.FriendBase.prototype.toObject = function(opt_includeInstance) { - return proto.FriendBase.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.FriendBase} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.FriendBase.toObject = function(includeInstance, msg) { - var f, obj = { - userid: jspb.Message.getFieldWithDefault(msg, 1, ""), - nickname: jspb.Message.getFieldWithDefault(msg, 2, ""), - level: jspb.Message.getFieldWithDefault(msg, 3, 0), - avatar: jspb.Message.getFieldWithDefault(msg, 4, 0), - strength: jspb.Message.getFieldWithDefault(msg, 5, 0), - serverid: jspb.Message.getFieldWithDefault(msg, 6, 0), - offlinetime: jspb.Message.getFieldWithDefault(msg, 7, 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.FriendBase} - */ -proto.FriendBase.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.FriendBase; - return proto.FriendBase.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.FriendBase} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.FriendBase} - */ -proto.FriendBase.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.setUserid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNickname(value); - break; - case 3: - var value = /** @type {number} */ (reader.readInt32()); - msg.setLevel(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setAvatar(value); - break; - case 5: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStrength(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setServerid(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setOfflinetime(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.FriendBase.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.FriendBase.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.FriendBase} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.FriendBase.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNickname(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getLevel(); - if (f !== 0) { - writer.writeInt32( - 3, - f - ); - } - f = message.getAvatar(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getStrength(); - if (f !== 0) { - writer.writeInt64( - 5, - f - ); - } - f = message.getServerid(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getOfflinetime(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } -}; - - -/** - * optional string userId = 1; - * @return {string} - */ -proto.FriendBase.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.FriendBase} returns this - */ -proto.FriendBase.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string NickName = 2; - * @return {string} - */ -proto.FriendBase.prototype.getNickname = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.FriendBase} returns this - */ -proto.FriendBase.prototype.setNickname = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional int32 level = 3; - * @return {number} - */ -proto.FriendBase.prototype.getLevel = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.FriendBase} returns this - */ -proto.FriendBase.prototype.setLevel = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); -}; - - -/** - * optional int32 avatar = 4; - * @return {number} - */ -proto.FriendBase.prototype.getAvatar = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.FriendBase} returns this - */ -proto.FriendBase.prototype.setAvatar = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional int64 strength = 5; - * @return {number} - */ -proto.FriendBase.prototype.getStrength = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.FriendBase} returns this - */ -proto.FriendBase.prototype.setStrength = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int32 serverId = 6; - * @return {number} - */ -proto.FriendBase.prototype.getServerid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.FriendBase} returns this - */ -proto.FriendBase.prototype.setServerid = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 offlineTime = 7; - * @return {number} - */ -proto.FriendBase.prototype.getOfflinetime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.FriendBase} returns this - */ -proto.FriendBase.prototype.setOfflinetime = function(value) { - return jspb.Message.setProto3IntField(this, 7, 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_, 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.Friend_List_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_List_Req.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.Friend_List_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_List_Req.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.Friend_List_Req} - */ -proto.Friend_List_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_List_Req; - return proto.Friend_List_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_List_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_List_Req} - */ -proto.Friend_List_Req.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.Friend_List_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_List_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_List_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_List_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Friend_List_Rsp.repeatedFields_ = [1]; - - - -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_, 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.Friend_List_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_List_Rsp.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.Friend_List_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_List_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - listList: jspb.Message.toObjectList(msg.getListList(), - proto.FriendBase.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Friend_List_Rsp} - */ -proto.Friend_List_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_List_Rsp; - return proto.Friend_List_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_List_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_List_Rsp} - */ -proto.Friend_List_Rsp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.FriendBase; - reader.readMessage(value,proto.FriendBase.deserializeBinaryFromReader); - msg.addList(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_List_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_List_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_List_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_List_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getListList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.FriendBase.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated FriendBase list = 1; - * @return {!Array} - */ -proto.Friend_List_Rsp.prototype.getListList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.FriendBase, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Friend_List_Rsp} returns this -*/ -proto.Friend_List_Rsp.prototype.setListList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.FriendBase=} opt_value - * @param {number=} opt_index - * @return {!proto.FriendBase} - */ -proto.Friend_List_Rsp.prototype.addList = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.FriendBase, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Friend_List_Rsp} returns this - */ -proto.Friend_List_Rsp.prototype.clearListList = function() { - return this.setListList([]); -}; - - - - - -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_, 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.Friend_Apply_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Apply_Req.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.Friend_Apply_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Apply_Req.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: 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.Friend_Apply_Req} - */ -proto.Friend_Apply_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Apply_Req; - return proto.Friend_Apply_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Apply_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Apply_Req} - */ -proto.Friend_Apply_Req.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.setFriendid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Apply_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Apply_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Apply_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Apply_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_Apply_Req.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Apply_Req} returns this - */ -proto.Friend_Apply_Req.prototype.setFriendid = 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_, 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.Friend_Apply_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Apply_Rsp.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.Friend_Apply_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Apply_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - userid: jspb.Message.getFieldWithDefault(msg, 1, ""), - friendid: 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.Friend_Apply_Rsp} - */ -proto.Friend_Apply_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Apply_Rsp; - return proto.Friend_Apply_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Apply_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Apply_Rsp} - */ -proto.Friend_Apply_Rsp.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.setUserid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setFriendid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Apply_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Apply_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Apply_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Apply_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string userId = 1; - * @return {string} - */ -proto.Friend_Apply_Rsp.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Apply_Rsp} returns this - */ -proto.Friend_Apply_Rsp.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string friendId = 2; - * @return {string} - */ -proto.Friend_Apply_Rsp.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Apply_Rsp} returns this - */ -proto.Friend_Apply_Rsp.prototype.setFriendid = 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_, 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.Friend_Del_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Del_Req.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.Friend_Del_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Del_Req.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: 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.Friend_Del_Req} - */ -proto.Friend_Del_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Del_Req; - return proto.Friend_Del_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Del_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Del_Req} - */ -proto.Friend_Del_Req.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.setFriendid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Del_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Del_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Del_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Del_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_Del_Req.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Del_Req} returns this - */ -proto.Friend_Del_Req.prototype.setFriendid = 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_, 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.Friend_Del_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Del_Rsp.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.Friend_Del_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Del_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: jspb.Message.getFieldWithDefault(msg, 1, ""), - userid: 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.Friend_Del_Rsp} - */ -proto.Friend_Del_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Del_Rsp; - return proto.Friend_Del_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Del_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Del_Rsp} - */ -proto.Friend_Del_Rsp.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.setFriendid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Del_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Del_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Del_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Del_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_Del_Rsp.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Del_Rsp} returns this - */ -proto.Friend_Del_Rsp.prototype.setFriendid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string userId = 2; - * @return {string} - */ -proto.Friend_Del_Rsp.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Del_Rsp} returns this - */ -proto.Friend_Del_Rsp.prototype.setUserid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Friend_Agree_Req.repeatedFields_ = [1]; - - - -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_, 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.Friend_Agree_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Agree_Req.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.Friend_Agree_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Agree_Req.toObject = function(includeInstance, msg) { - var f, obj = { - friendidsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.Friend_Agree_Req} - */ -proto.Friend_Agree_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Agree_Req; - return proto.Friend_Agree_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Agree_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Agree_Req} - */ -proto.Friend_Agree_Req.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.addFriendids(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Agree_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Agree_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Agree_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Agree_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendidsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string friendIds = 1; - * @return {!Array} - */ -proto.Friend_Agree_Req.prototype.getFriendidsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Friend_Agree_Req} returns this - */ -proto.Friend_Agree_Req.prototype.setFriendidsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.Friend_Agree_Req} returns this - */ -proto.Friend_Agree_Req.prototype.addFriendids = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Friend_Agree_Req} returns this - */ -proto.Friend_Agree_Req.prototype.clearFriendidsList = function() { - return this.setFriendidsList([]); -}; - - - - - -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_, 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.Friend_Agree_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Agree_Rsp.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.Friend_Agree_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Agree_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - num: jspb.Message.getFieldWithDefault(msg, 1, 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.Friend_Agree_Rsp} - */ -proto.Friend_Agree_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Agree_Rsp; - return proto.Friend_Agree_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Agree_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Agree_Rsp} - */ -proto.Friend_Agree_Rsp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNum(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Agree_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Agree_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Agree_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Agree_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNum(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } -}; - - -/** - * optional int32 Num = 1; - * @return {number} - */ -proto.Friend_Agree_Rsp.prototype.getNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Friend_Agree_Rsp} returns this - */ -proto.Friend_Agree_Rsp.prototype.setNum = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Friend_Refuse_Req.repeatedFields_ = [1]; - - - -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_, 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.Friend_Refuse_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Refuse_Req.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.Friend_Refuse_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Refuse_Req.toObject = function(includeInstance, msg) { - var f, obj = { - friendidsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : 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.Friend_Refuse_Req} - */ -proto.Friend_Refuse_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Refuse_Req; - return proto.Friend_Refuse_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Refuse_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Refuse_Req} - */ -proto.Friend_Refuse_Req.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.addFriendids(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Refuse_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Refuse_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Refuse_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Refuse_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendidsList(); - if (f.length > 0) { - writer.writeRepeatedString( - 1, - f - ); - } -}; - - -/** - * repeated string friendIds = 1; - * @return {!Array} - */ -proto.Friend_Refuse_Req.prototype.getFriendidsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Friend_Refuse_Req} returns this - */ -proto.Friend_Refuse_Req.prototype.setFriendidsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.Friend_Refuse_Req} returns this - */ -proto.Friend_Refuse_Req.prototype.addFriendids = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Friend_Refuse_Req} returns this - */ -proto.Friend_Refuse_Req.prototype.clearFriendidsList = function() { - return this.setFriendidsList([]); -}; - - - - - -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_, 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.Friend_Refuse_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Refuse_Rsp.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.Friend_Refuse_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Refuse_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - num: jspb.Message.getFieldWithDefault(msg, 1, 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.Friend_Refuse_Rsp} - */ -proto.Friend_Refuse_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Refuse_Rsp; - return proto.Friend_Refuse_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Refuse_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Refuse_Rsp} - */ -proto.Friend_Refuse_Rsp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setNum(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Refuse_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Refuse_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Refuse_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Refuse_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNum(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } -}; - - -/** - * optional int32 Num = 1; - * @return {number} - */ -proto.Friend_Refuse_Rsp.prototype.getNum = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Friend_Refuse_Rsp} returns this - */ -proto.Friend_Refuse_Rsp.prototype.setNum = function(value) { - return jspb.Message.setProto3IntField(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_, 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.Friend_ApplyList_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_ApplyList_Req.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.Friend_ApplyList_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_ApplyList_Req.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.Friend_ApplyList_Req} - */ -proto.Friend_ApplyList_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_ApplyList_Req; - return proto.Friend_ApplyList_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_ApplyList_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_ApplyList_Req} - */ -proto.Friend_ApplyList_Req.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.Friend_ApplyList_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_ApplyList_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_ApplyList_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_ApplyList_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Friend_ApplyList_Rsp.repeatedFields_ = [1]; - - - -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_, 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.Friend_ApplyList_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_ApplyList_Rsp.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.Friend_ApplyList_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_ApplyList_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - listList: jspb.Message.toObjectList(msg.getListList(), - proto.FriendBase.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Friend_ApplyList_Rsp} - */ -proto.Friend_ApplyList_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_ApplyList_Rsp; - return proto.Friend_ApplyList_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_ApplyList_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_ApplyList_Rsp} - */ -proto.Friend_ApplyList_Rsp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.FriendBase; - reader.readMessage(value,proto.FriendBase.deserializeBinaryFromReader); - msg.addList(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_ApplyList_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_ApplyList_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_ApplyList_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_ApplyList_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getListList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.FriendBase.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated FriendBase list = 1; - * @return {!Array} - */ -proto.Friend_ApplyList_Rsp.prototype.getListList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.FriendBase, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Friend_ApplyList_Rsp} returns this -*/ -proto.Friend_ApplyList_Rsp.prototype.setListList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.FriendBase=} opt_value - * @param {number=} opt_index - * @return {!proto.FriendBase} - */ -proto.Friend_ApplyList_Rsp.prototype.addList = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.FriendBase, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Friend_ApplyList_Rsp} returns this - */ -proto.Friend_ApplyList_Rsp.prototype.clearListList = function() { - return this.setListList([]); -}; - - - - - -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_, 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.Friend_Search_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Search_Req.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.Friend_Search_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Search_Req.toObject = function(includeInstance, msg) { - var f, obj = { - nickname: 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.Friend_Search_Req} - */ -proto.Friend_Search_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Search_Req; - return proto.Friend_Search_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Search_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Search_Req} - */ -proto.Friend_Search_Req.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.setNickname(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Search_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Search_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Search_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Search_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNickname(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string nickName = 1; - * @return {string} - */ -proto.Friend_Search_Req.prototype.getNickname = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Search_Req} returns this - */ -proto.Friend_Search_Req.prototype.setNickname = 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_, 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.Friend_Search_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Search_Rsp.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.Friend_Search_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Search_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - friend: (f = msg.getFriend()) && proto.FriendBase.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.Friend_Search_Rsp} - */ -proto.Friend_Search_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Search_Rsp; - return proto.Friend_Search_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Search_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Search_Rsp} - */ -proto.Friend_Search_Rsp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.FriendBase; - reader.readMessage(value,proto.FriendBase.deserializeBinaryFromReader); - msg.setFriend(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Search_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Search_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Search_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Search_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriend(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.FriendBase.serializeBinaryToWriter - ); - } -}; - - -/** - * optional FriendBase friend = 1; - * @return {?proto.FriendBase} - */ -proto.Friend_Search_Rsp.prototype.getFriend = function() { - return /** @type{?proto.FriendBase} */ ( - jspb.Message.getWrapperField(this, proto.FriendBase, 1)); -}; - - -/** - * @param {?proto.FriendBase|undefined} value - * @return {!proto.Friend_Search_Rsp} returns this -*/ -proto.Friend_Search_Rsp.prototype.setFriend = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.Friend_Search_Rsp} returns this - */ -proto.Friend_Search_Rsp.prototype.clearFriend = function() { - return this.setFriend(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Friend_Search_Rsp.prototype.hasFriend = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -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_, 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.Friend_BlackList_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_BlackList_Req.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.Friend_BlackList_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_BlackList_Req.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.Friend_BlackList_Req} - */ -proto.Friend_BlackList_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_BlackList_Req; - return proto.Friend_BlackList_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_BlackList_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_BlackList_Req} - */ -proto.Friend_BlackList_Req.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.Friend_BlackList_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_BlackList_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_BlackList_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_BlackList_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Friend_BlackList_Rsp.repeatedFields_ = [1]; - - - -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_, 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.Friend_BlackList_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_BlackList_Rsp.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.Friend_BlackList_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_BlackList_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - friendsList: jspb.Message.toObjectList(msg.getFriendsList(), - proto.FriendBase.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Friend_BlackList_Rsp} - */ -proto.Friend_BlackList_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_BlackList_Rsp; - return proto.Friend_BlackList_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_BlackList_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_BlackList_Rsp} - */ -proto.Friend_BlackList_Rsp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.FriendBase; - reader.readMessage(value,proto.FriendBase.deserializeBinaryFromReader); - msg.addFriends(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_BlackList_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_BlackList_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_BlackList_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_BlackList_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.FriendBase.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated FriendBase friends = 1; - * @return {!Array} - */ -proto.Friend_BlackList_Rsp.prototype.getFriendsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.FriendBase, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Friend_BlackList_Rsp} returns this -*/ -proto.Friend_BlackList_Rsp.prototype.setFriendsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.FriendBase=} opt_value - * @param {number=} opt_index - * @return {!proto.FriendBase} - */ -proto.Friend_BlackList_Rsp.prototype.addFriends = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.FriendBase, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Friend_BlackList_Rsp} returns this - */ -proto.Friend_BlackList_Rsp.prototype.clearFriendsList = function() { - return this.setFriendsList([]); -}; - - - - - -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_, 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.Friend_BlackAdd_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_BlackAdd_Req.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.Friend_BlackAdd_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_BlackAdd_Req.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: 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.Friend_BlackAdd_Req} - */ -proto.Friend_BlackAdd_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_BlackAdd_Req; - return proto.Friend_BlackAdd_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_BlackAdd_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_BlackAdd_Req} - */ -proto.Friend_BlackAdd_Req.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.setFriendid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_BlackAdd_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_BlackAdd_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_BlackAdd_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_BlackAdd_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_BlackAdd_Req.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_BlackAdd_Req} returns this - */ -proto.Friend_BlackAdd_Req.prototype.setFriendid = 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_, 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.Friend_BlackAdd_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_BlackAdd_Rsp.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.Friend_BlackAdd_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_BlackAdd_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: jspb.Message.getFieldWithDefault(msg, 1, ""), - userid: 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.Friend_BlackAdd_Rsp} - */ -proto.Friend_BlackAdd_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_BlackAdd_Rsp; - return proto.Friend_BlackAdd_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_BlackAdd_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_BlackAdd_Rsp} - */ -proto.Friend_BlackAdd_Rsp.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.setFriendid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_BlackAdd_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_BlackAdd_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_BlackAdd_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_BlackAdd_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_BlackAdd_Rsp.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_BlackAdd_Rsp} returns this - */ -proto.Friend_BlackAdd_Rsp.prototype.setFriendid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string userId = 2; - * @return {string} - */ -proto.Friend_BlackAdd_Rsp.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_BlackAdd_Rsp} returns this - */ -proto.Friend_BlackAdd_Rsp.prototype.setUserid = 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_, 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.Friend_DelBlack_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_DelBlack_Req.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.Friend_DelBlack_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_DelBlack_Req.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: 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.Friend_DelBlack_Req} - */ -proto.Friend_DelBlack_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_DelBlack_Req; - return proto.Friend_DelBlack_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_DelBlack_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_DelBlack_Req} - */ -proto.Friend_DelBlack_Req.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.setFriendid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_DelBlack_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_DelBlack_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_DelBlack_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_DelBlack_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_DelBlack_Req.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_DelBlack_Req} returns this - */ -proto.Friend_DelBlack_Req.prototype.setFriendid = 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_, 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.Friend_DelBlack_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_DelBlack_Rsp.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.Friend_DelBlack_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_DelBlack_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: jspb.Message.getFieldWithDefault(msg, 1, ""), - userid: 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.Friend_DelBlack_Rsp} - */ -proto.Friend_DelBlack_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_DelBlack_Rsp; - return proto.Friend_DelBlack_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_DelBlack_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_DelBlack_Rsp} - */ -proto.Friend_DelBlack_Rsp.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.setFriendid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_DelBlack_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_DelBlack_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_DelBlack_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_DelBlack_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_DelBlack_Rsp.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_DelBlack_Rsp} returns this - */ -proto.Friend_DelBlack_Rsp.prototype.setFriendid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string userId = 2; - * @return {string} - */ -proto.Friend_DelBlack_Rsp.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_DelBlack_Rsp} returns this - */ -proto.Friend_DelBlack_Rsp.prototype.setUserid = 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_, 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.Friend_Receive_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Receive_Req.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.Friend_Receive_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Receive_Req.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: 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.Friend_Receive_Req} - */ -proto.Friend_Receive_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Receive_Req; - return proto.Friend_Receive_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Receive_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Receive_Req} - */ -proto.Friend_Receive_Req.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.setFriendid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Receive_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Receive_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Receive_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Receive_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_Receive_Req.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Receive_Req} returns this - */ -proto.Friend_Receive_Req.prototype.setFriendid = 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_, 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.Friend_Receive_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Receive_Rsp.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.Friend_Receive_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Receive_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: jspb.Message.getFieldWithDefault(msg, 1, ""), - userid: 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.Friend_Receive_Rsp} - */ -proto.Friend_Receive_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Receive_Rsp; - return proto.Friend_Receive_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Receive_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Receive_Rsp} - */ -proto.Friend_Receive_Rsp.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.setFriendid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Receive_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Receive_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Receive_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Receive_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_Receive_Rsp.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Receive_Rsp} returns this - */ -proto.Friend_Receive_Rsp.prototype.setFriendid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string userId = 2; - * @return {string} - */ -proto.Friend_Receive_Rsp.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Receive_Rsp} returns this - */ -proto.Friend_Receive_Rsp.prototype.setUserid = 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_, 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.Friend_Give_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Give_Req.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.Friend_Give_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Give_Req.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: 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.Friend_Give_Req} - */ -proto.Friend_Give_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Give_Req; - return proto.Friend_Give_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Give_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Give_Req} - */ -proto.Friend_Give_Req.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.setFriendid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Give_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Give_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Give_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Give_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_Give_Req.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Give_Req} returns this - */ -proto.Friend_Give_Req.prototype.setFriendid = 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_, 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.Friend_Give_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Give_Rsp.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.Friend_Give_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Give_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: jspb.Message.getFieldWithDefault(msg, 1, ""), - userid: 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.Friend_Give_Rsp} - */ -proto.Friend_Give_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Give_Rsp; - return proto.Friend_Give_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Give_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Give_Rsp} - */ -proto.Friend_Give_Rsp.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.setFriendid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Give_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Give_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Give_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Give_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUserid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_Give_Rsp.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Give_Rsp} returns this - */ -proto.Friend_Give_Rsp.prototype.setFriendid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string userId = 2; - * @return {string} - */ -proto.Friend_Give_Rsp.prototype.getUserid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Give_Rsp} returns this - */ -proto.Friend_Give_Rsp.prototype.setUserid = 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_, 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.Friend_Total_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Total_Req.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.Friend_Total_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Total_Req.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: 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.Friend_Total_Req} - */ -proto.Friend_Total_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Total_Req; - return proto.Friend_Total_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Total_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Total_Req} - */ -proto.Friend_Total_Req.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.setFriendid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Total_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Total_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Total_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Total_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_Total_Req.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Total_Req} returns this - */ -proto.Friend_Total_Req.prototype.setFriendid = 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_, 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.Friend_Total_Rsp.prototype.toObject = function(opt_includeInstance) { - return proto.Friend_Total_Rsp.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.Friend_Total_Rsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Total_Rsp.toObject = function(includeInstance, msg) { - var f, obj = { - friendid: jspb.Message.getFieldWithDefault(msg, 1, ""), - total: jspb.Message.getFieldWithDefault(msg, 2, 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.Friend_Total_Rsp} - */ -proto.Friend_Total_Rsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Friend_Total_Rsp; - return proto.Friend_Total_Rsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Friend_Total_Rsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Friend_Total_Rsp} - */ -proto.Friend_Total_Rsp.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.setFriendid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setTotal(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Friend_Total_Rsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Friend_Total_Rsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Friend_Total_Rsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Friend_Total_Rsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getFriendid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getTotal(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional string friendId = 1; - * @return {string} - */ -proto.Friend_Total_Rsp.prototype.getFriendid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Friend_Total_Rsp} returns this - */ -proto.Friend_Total_Rsp.prototype.setFriendid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int32 total = 2; - * @return {number} - */ -proto.Friend_Total_Rsp.prototype.getTotal = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Friend_Total_Rsp} returns this - */ -proto.Friend_Total_Rsp.prototype.setTotal = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/js/mail/mail_db_pb.js b/src/pb/js/mail/mail_db_pb.js deleted file mode 100644 index 58881ad..0000000 --- a/src/pb/js/mail/mail_db_pb.js +++ /dev/null @@ -1,622 +0,0 @@ -// source: mail/mail_db.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 || window || global || self || Function('return this')(); }).call(null); - -goog.exportSymbol('proto.DB_MailData', null, global); -goog.exportSymbol('proto.MailAttachment', 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.MailAttachment = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.MailAttachment, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.MailAttachment.displayName = 'proto.MailAttachment'; -} -/** - * 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.DB_MailData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.DB_MailData.repeatedFields_, null); -}; -goog.inherits(proto.DB_MailData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.DB_MailData.displayName = 'proto.DB_MailData'; -} - - - -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_, 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.MailAttachment.prototype.toObject = function(opt_includeInstance) { - return proto.MailAttachment.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.MailAttachment} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.MailAttachment.toObject = function(includeInstance, msg) { - var f, obj = { - itemid: jspb.Message.getFieldWithDefault(msg, 1, 0), - itemcount: jspb.Message.getFieldWithDefault(msg, 2, 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.MailAttachment} - */ -proto.MailAttachment.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.MailAttachment; - return proto.MailAttachment.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.MailAttachment} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.MailAttachment} - */ -proto.MailAttachment.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readUint32()); - msg.setItemid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setItemcount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.MailAttachment.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.MailAttachment.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.MailAttachment} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.MailAttachment.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getItemid(); - if (f !== 0) { - writer.writeUint32( - 1, - f - ); - } - f = message.getItemcount(); - if (f !== 0) { - writer.writeUint32( - 2, - f - ); - } -}; - - -/** - * optional uint32 ItemId = 1; - * @return {number} - */ -proto.MailAttachment.prototype.getItemid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.MailAttachment} returns this - */ -proto.MailAttachment.prototype.setItemid = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional uint32 ItemCount = 2; - * @return {number} - */ -proto.MailAttachment.prototype.getItemcount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.MailAttachment} returns this - */ -proto.MailAttachment.prototype.setItemcount = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.DB_MailData.repeatedFields_ = [9]; - - - -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_, 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.DB_MailData.prototype.toObject = function(opt_includeInstance) { - return proto.DB_MailData.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.DB_MailData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.DB_MailData.toObject = function(includeInstance, msg) { - var f, obj = { - objid: jspb.Message.getFieldWithDefault(msg, 1, ""), - uid: jspb.Message.getFieldWithDefault(msg, 2, ""), - title: jspb.Message.getFieldWithDefault(msg, 3, ""), - contex: jspb.Message.getFieldWithDefault(msg, 4, ""), - createtime: jspb.Message.getFieldWithDefault(msg, 5, 0), - duetime: jspb.Message.getFieldWithDefault(msg, 6, 0), - check: jspb.Message.getBooleanFieldWithDefault(msg, 7, false), - reward: jspb.Message.getBooleanFieldWithDefault(msg, 8, false), - itemsList: jspb.Message.toObjectList(msg.getItemsList(), - proto.MailAttachment.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.DB_MailData} - */ -proto.DB_MailData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.DB_MailData; - return proto.DB_MailData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.DB_MailData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.DB_MailData} - */ -proto.DB_MailData.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.setObjid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setTitle(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setContex(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint64()); - msg.setCreatetime(value); - break; - case 6: - var value = /** @type {number} */ (reader.readUint64()); - msg.setDuetime(value); - break; - case 7: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setCheck(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setReward(value); - break; - case 9: - var value = new proto.MailAttachment; - reader.readMessage(value,proto.MailAttachment.deserializeBinaryFromReader); - msg.addItems(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.DB_MailData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.DB_MailData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.DB_MailData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.DB_MailData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getObjid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTitle(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getContex(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getCreatetime(); - if (f !== 0) { - writer.writeUint64( - 5, - f - ); - } - f = message.getDuetime(); - if (f !== 0) { - writer.writeUint64( - 6, - f - ); - } - f = message.getCheck(); - if (f) { - writer.writeBool( - 7, - f - ); - } - f = message.getReward(); - if (f) { - writer.writeBool( - 8, - f - ); - } - f = message.getItemsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 9, - f, - proto.MailAttachment.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string ObjId = 1; - * @return {string} - */ -proto.DB_MailData.prototype.getObjid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_MailData} returns this - */ -proto.DB_MailData.prototype.setObjid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string Uid = 2; - * @return {string} - */ -proto.DB_MailData.prototype.getUid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_MailData} returns this - */ -proto.DB_MailData.prototype.setUid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string Title = 3; - * @return {string} - */ -proto.DB_MailData.prototype.getTitle = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_MailData} returns this - */ -proto.DB_MailData.prototype.setTitle = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string Contex = 4; - * @return {string} - */ -proto.DB_MailData.prototype.getContex = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_MailData} returns this - */ -proto.DB_MailData.prototype.setContex = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional uint64 CreateTime = 5; - * @return {number} - */ -proto.DB_MailData.prototype.getCreatetime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_MailData} returns this - */ -proto.DB_MailData.prototype.setCreatetime = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional uint64 DueTime = 6; - * @return {number} - */ -proto.DB_MailData.prototype.getDuetime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_MailData} returns this - */ -proto.DB_MailData.prototype.setDuetime = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional bool Check = 7; - * @return {boolean} - */ -proto.DB_MailData.prototype.getCheck = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 7, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.DB_MailData} returns this - */ -proto.DB_MailData.prototype.setCheck = function(value) { - return jspb.Message.setProto3BooleanField(this, 7, value); -}; - - -/** - * optional bool Reward = 8; - * @return {boolean} - */ -proto.DB_MailData.prototype.getReward = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.DB_MailData} returns this - */ -proto.DB_MailData.prototype.setReward = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - -/** - * repeated MailAttachment Items = 9; - * @return {!Array} - */ -proto.DB_MailData.prototype.getItemsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.MailAttachment, 9)); -}; - - -/** - * @param {!Array} value - * @return {!proto.DB_MailData} returns this -*/ -proto.DB_MailData.prototype.setItemsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 9, value); -}; - - -/** - * @param {!proto.MailAttachment=} opt_value - * @param {number=} opt_index - * @return {!proto.MailAttachment} - */ -proto.DB_MailData.prototype.addItems = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 9, opt_value, proto.MailAttachment, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.DB_MailData} returns this - */ -proto.DB_MailData.prototype.clearItemsList = function() { - return this.setItemsList([]); -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/js/mail/mail_msg_pb.js b/src/pb/js/mail/mail_msg_pb.js deleted file mode 100644 index 64878d6..0000000 --- a/src/pb/js/mail/mail_msg_pb.js +++ /dev/null @@ -1,1309 +0,0 @@ -// source: mail/mail_msg.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 || window || global || self || Function('return this')(); }).call(null); - -var mail_mail_db_pb = require('../mail/mail_db_pb.js'); -goog.object.extend(proto, mail_mail_db_pb); -goog.exportSymbol('proto.Mail_DelMail_Req', null, global); -goog.exportSymbol('proto.Mail_DelMail_Resp', null, global); -goog.exportSymbol('proto.Mail_GetList_Req', null, global); -goog.exportSymbol('proto.Mail_GetList_Resp', null, global); -goog.exportSymbol('proto.Mail_GetUserMailAttachment_Req', null, global); -goog.exportSymbol('proto.Mail_GetUserMailAttachment_Resp', null, global); -goog.exportSymbol('proto.Mail_ReadMail_Req', null, global); -goog.exportSymbol('proto.Mail_ReadMail_Resp', 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.Mail_GetList_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Mail_GetList_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Mail_GetList_Req.displayName = 'proto.Mail_GetList_Req'; -} -/** - * 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.Mail_GetList_Resp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Mail_GetList_Resp.repeatedFields_, null); -}; -goog.inherits(proto.Mail_GetList_Resp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Mail_GetList_Resp.displayName = 'proto.Mail_GetList_Resp'; -} -/** - * 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.Mail_ReadMail_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Mail_ReadMail_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Mail_ReadMail_Req.displayName = 'proto.Mail_ReadMail_Req'; -} -/** - * 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.Mail_ReadMail_Resp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Mail_ReadMail_Resp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Mail_ReadMail_Resp.displayName = 'proto.Mail_ReadMail_Resp'; -} -/** - * 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.Mail_GetUserMailAttachment_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Mail_GetUserMailAttachment_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Mail_GetUserMailAttachment_Req.displayName = 'proto.Mail_GetUserMailAttachment_Req'; -} -/** - * 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.Mail_GetUserMailAttachment_Resp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Mail_GetUserMailAttachment_Resp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Mail_GetUserMailAttachment_Resp.displayName = 'proto.Mail_GetUserMailAttachment_Resp'; -} -/** - * 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.Mail_DelMail_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Mail_DelMail_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Mail_DelMail_Req.displayName = 'proto.Mail_DelMail_Req'; -} -/** - * 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.Mail_DelMail_Resp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Mail_DelMail_Resp.repeatedFields_, null); -}; -goog.inherits(proto.Mail_DelMail_Resp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Mail_DelMail_Resp.displayName = 'proto.Mail_DelMail_Resp'; -} - - - -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_, 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.Mail_GetList_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Mail_GetList_Req.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.Mail_GetList_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_GetList_Req.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.Mail_GetList_Req} - */ -proto.Mail_GetList_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Mail_GetList_Req; - return proto.Mail_GetList_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Mail_GetList_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Mail_GetList_Req} - */ -proto.Mail_GetList_Req.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.Mail_GetList_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Mail_GetList_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Mail_GetList_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_GetList_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Mail_GetList_Resp.repeatedFields_ = [1]; - - - -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_, 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.Mail_GetList_Resp.prototype.toObject = function(opt_includeInstance) { - return proto.Mail_GetList_Resp.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.Mail_GetList_Resp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_GetList_Resp.toObject = function(includeInstance, msg) { - var f, obj = { - mailsList: jspb.Message.toObjectList(msg.getMailsList(), - mail_mail_db_pb.DB_MailData.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Mail_GetList_Resp} - */ -proto.Mail_GetList_Resp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Mail_GetList_Resp; - return proto.Mail_GetList_Resp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Mail_GetList_Resp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Mail_GetList_Resp} - */ -proto.Mail_GetList_Resp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new mail_mail_db_pb.DB_MailData; - reader.readMessage(value,mail_mail_db_pb.DB_MailData.deserializeBinaryFromReader); - msg.addMails(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Mail_GetList_Resp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Mail_GetList_Resp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Mail_GetList_Resp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_GetList_Resp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMailsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - mail_mail_db_pb.DB_MailData.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated DB_MailData Mails = 1; - * @return {!Array} - */ -proto.Mail_GetList_Resp.prototype.getMailsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, mail_mail_db_pb.DB_MailData, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Mail_GetList_Resp} returns this -*/ -proto.Mail_GetList_Resp.prototype.setMailsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.DB_MailData=} opt_value - * @param {number=} opt_index - * @return {!proto.DB_MailData} - */ -proto.Mail_GetList_Resp.prototype.addMails = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.DB_MailData, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Mail_GetList_Resp} returns this - */ -proto.Mail_GetList_Resp.prototype.clearMailsList = function() { - return this.setMailsList([]); -}; - - - - - -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_, 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.Mail_ReadMail_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Mail_ReadMail_Req.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.Mail_ReadMail_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_ReadMail_Req.toObject = function(includeInstance, msg) { - var f, obj = { - objid: 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.Mail_ReadMail_Req} - */ -proto.Mail_ReadMail_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Mail_ReadMail_Req; - return proto.Mail_ReadMail_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Mail_ReadMail_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Mail_ReadMail_Req} - */ -proto.Mail_ReadMail_Req.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.setObjid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Mail_ReadMail_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Mail_ReadMail_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Mail_ReadMail_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_ReadMail_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getObjid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string ObjID = 1; - * @return {string} - */ -proto.Mail_ReadMail_Req.prototype.getObjid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Mail_ReadMail_Req} returns this - */ -proto.Mail_ReadMail_Req.prototype.setObjid = 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_, 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.Mail_ReadMail_Resp.prototype.toObject = function(opt_includeInstance) { - return proto.Mail_ReadMail_Resp.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.Mail_ReadMail_Resp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_ReadMail_Resp.toObject = function(includeInstance, msg) { - var f, obj = { - mail: (f = msg.getMail()) && mail_mail_db_pb.DB_MailData.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.Mail_ReadMail_Resp} - */ -proto.Mail_ReadMail_Resp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Mail_ReadMail_Resp; - return proto.Mail_ReadMail_Resp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Mail_ReadMail_Resp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Mail_ReadMail_Resp} - */ -proto.Mail_ReadMail_Resp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new mail_mail_db_pb.DB_MailData; - reader.readMessage(value,mail_mail_db_pb.DB_MailData.deserializeBinaryFromReader); - msg.setMail(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Mail_ReadMail_Resp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Mail_ReadMail_Resp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Mail_ReadMail_Resp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_ReadMail_Resp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMail(); - if (f != null) { - writer.writeMessage( - 1, - f, - mail_mail_db_pb.DB_MailData.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DB_MailData Mail = 1; - * @return {?proto.DB_MailData} - */ -proto.Mail_ReadMail_Resp.prototype.getMail = function() { - return /** @type{?proto.DB_MailData} */ ( - jspb.Message.getWrapperField(this, mail_mail_db_pb.DB_MailData, 1)); -}; - - -/** - * @param {?proto.DB_MailData|undefined} value - * @return {!proto.Mail_ReadMail_Resp} returns this -*/ -proto.Mail_ReadMail_Resp.prototype.setMail = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.Mail_ReadMail_Resp} returns this - */ -proto.Mail_ReadMail_Resp.prototype.clearMail = function() { - return this.setMail(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Mail_ReadMail_Resp.prototype.hasMail = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -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_, 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.Mail_GetUserMailAttachment_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Mail_GetUserMailAttachment_Req.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.Mail_GetUserMailAttachment_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_GetUserMailAttachment_Req.toObject = function(includeInstance, msg) { - var f, obj = { - objid: 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.Mail_GetUserMailAttachment_Req} - */ -proto.Mail_GetUserMailAttachment_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Mail_GetUserMailAttachment_Req; - return proto.Mail_GetUserMailAttachment_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Mail_GetUserMailAttachment_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Mail_GetUserMailAttachment_Req} - */ -proto.Mail_GetUserMailAttachment_Req.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.setObjid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Mail_GetUserMailAttachment_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Mail_GetUserMailAttachment_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Mail_GetUserMailAttachment_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_GetUserMailAttachment_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getObjid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string ObjID = 1; - * @return {string} - */ -proto.Mail_GetUserMailAttachment_Req.prototype.getObjid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Mail_GetUserMailAttachment_Req} returns this - */ -proto.Mail_GetUserMailAttachment_Req.prototype.setObjid = 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_, 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.Mail_GetUserMailAttachment_Resp.prototype.toObject = function(opt_includeInstance) { - return proto.Mail_GetUserMailAttachment_Resp.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.Mail_GetUserMailAttachment_Resp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_GetUserMailAttachment_Resp.toObject = function(includeInstance, msg) { - var f, obj = { - mail: (f = msg.getMail()) && mail_mail_db_pb.DB_MailData.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.Mail_GetUserMailAttachment_Resp} - */ -proto.Mail_GetUserMailAttachment_Resp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Mail_GetUserMailAttachment_Resp; - return proto.Mail_GetUserMailAttachment_Resp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Mail_GetUserMailAttachment_Resp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Mail_GetUserMailAttachment_Resp} - */ -proto.Mail_GetUserMailAttachment_Resp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new mail_mail_db_pb.DB_MailData; - reader.readMessage(value,mail_mail_db_pb.DB_MailData.deserializeBinaryFromReader); - msg.setMail(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Mail_GetUserMailAttachment_Resp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Mail_GetUserMailAttachment_Resp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Mail_GetUserMailAttachment_Resp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_GetUserMailAttachment_Resp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMail(); - if (f != null) { - writer.writeMessage( - 1, - f, - mail_mail_db_pb.DB_MailData.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DB_MailData Mail = 1; - * @return {?proto.DB_MailData} - */ -proto.Mail_GetUserMailAttachment_Resp.prototype.getMail = function() { - return /** @type{?proto.DB_MailData} */ ( - jspb.Message.getWrapperField(this, mail_mail_db_pb.DB_MailData, 1)); -}; - - -/** - * @param {?proto.DB_MailData|undefined} value - * @return {!proto.Mail_GetUserMailAttachment_Resp} returns this -*/ -proto.Mail_GetUserMailAttachment_Resp.prototype.setMail = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.Mail_GetUserMailAttachment_Resp} returns this - */ -proto.Mail_GetUserMailAttachment_Resp.prototype.clearMail = function() { - return this.setMail(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.Mail_GetUserMailAttachment_Resp.prototype.hasMail = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -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_, 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.Mail_DelMail_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Mail_DelMail_Req.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.Mail_DelMail_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_DelMail_Req.toObject = function(includeInstance, msg) { - var f, obj = { - objid: 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.Mail_DelMail_Req} - */ -proto.Mail_DelMail_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Mail_DelMail_Req; - return proto.Mail_DelMail_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Mail_DelMail_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Mail_DelMail_Req} - */ -proto.Mail_DelMail_Req.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.setObjid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Mail_DelMail_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Mail_DelMail_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Mail_DelMail_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_DelMail_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getObjid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string ObjID = 1; - * @return {string} - */ -proto.Mail_DelMail_Req.prototype.getObjid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Mail_DelMail_Req} returns this - */ -proto.Mail_DelMail_Req.prototype.setObjid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Mail_DelMail_Resp.repeatedFields_ = [1]; - - - -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_, 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.Mail_DelMail_Resp.prototype.toObject = function(opt_includeInstance) { - return proto.Mail_DelMail_Resp.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.Mail_DelMail_Resp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_DelMail_Resp.toObject = function(includeInstance, msg) { - var f, obj = { - mailList: jspb.Message.toObjectList(msg.getMailList(), - mail_mail_db_pb.DB_MailData.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Mail_DelMail_Resp} - */ -proto.Mail_DelMail_Resp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Mail_DelMail_Resp; - return proto.Mail_DelMail_Resp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Mail_DelMail_Resp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Mail_DelMail_Resp} - */ -proto.Mail_DelMail_Resp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new mail_mail_db_pb.DB_MailData; - reader.readMessage(value,mail_mail_db_pb.DB_MailData.deserializeBinaryFromReader); - msg.addMail(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Mail_DelMail_Resp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Mail_DelMail_Resp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Mail_DelMail_Resp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Mail_DelMail_Resp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getMailList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - mail_mail_db_pb.DB_MailData.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated DB_MailData Mail = 1; - * @return {!Array} - */ -proto.Mail_DelMail_Resp.prototype.getMailList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, mail_mail_db_pb.DB_MailData, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Mail_DelMail_Resp} returns this -*/ -proto.Mail_DelMail_Resp.prototype.setMailList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.DB_MailData=} opt_value - * @param {number=} opt_index - * @return {!proto.DB_MailData} - */ -proto.Mail_DelMail_Resp.prototype.addMail = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.DB_MailData, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Mail_DelMail_Resp} returns this - */ -proto.Mail_DelMail_Resp.prototype.clearMailList = function() { - return this.setMailList([]); -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/js/notify/notify_msg_pb.js b/src/pb/js/notify/notify_msg_pb.js deleted file mode 100644 index 3a74ba6..0000000 --- a/src/pb/js/notify/notify_msg_pb.js +++ /dev/null @@ -1,292 +0,0 @@ -// source: notify/notify_msg.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 || window || global || self || Function('return this')(); }).call(null); - -var errorcode_pb = require('../errorcode_pb.js'); -goog.object.extend(proto, errorcode_pb); -goog.exportSymbol('proto.ErrorNotify', 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.ErrorNotify = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.ErrorNotify, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.ErrorNotify.displayName = 'proto.ErrorNotify'; -} - - - -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_, 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.ErrorNotify.prototype.toObject = function(opt_includeInstance) { - return proto.ErrorNotify.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.ErrorNotify} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ErrorNotify.toObject = function(includeInstance, msg) { - var f, obj = { - reqmaintype: jspb.Message.getFieldWithDefault(msg, 1, ""), - reqsubtype: jspb.Message.getFieldWithDefault(msg, 2, ""), - code: jspb.Message.getFieldWithDefault(msg, 3, 0), - message: jspb.Message.getFieldWithDefault(msg, 4, ""), - data: jspb.Message.getFieldWithDefault(msg, 6, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.ErrorNotify} - */ -proto.ErrorNotify.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.ErrorNotify; - return proto.ErrorNotify.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.ErrorNotify} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.ErrorNotify} - */ -proto.ErrorNotify.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.setReqmaintype(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setReqsubtype(value); - break; - case 3: - var value = /** @type {!proto.ErrorCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - case 6: - var value = /** @type {string} */ (reader.readString()); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.ErrorNotify.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.ErrorNotify.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.ErrorNotify} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.ErrorNotify.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getReqmaintype(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getReqsubtype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 3, - f - ); - } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getData(); - if (f.length > 0) { - writer.writeString( - 6, - f - ); - } -}; - - -/** - * optional string ReqMainType = 1; - * @return {string} - */ -proto.ErrorNotify.prototype.getReqmaintype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ErrorNotify} returns this - */ -proto.ErrorNotify.prototype.setReqmaintype = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string ReqSubType = 2; - * @return {string} - */ -proto.ErrorNotify.prototype.getReqsubtype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ErrorNotify} returns this - */ -proto.ErrorNotify.prototype.setReqsubtype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional ErrorCode Code = 3; - * @return {!proto.ErrorCode} - */ -proto.ErrorNotify.prototype.getCode = function() { - return /** @type {!proto.ErrorCode} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {!proto.ErrorCode} value - * @return {!proto.ErrorNotify} returns this - */ -proto.ErrorNotify.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 3, value); -}; - - -/** - * optional string Message = 4; - * @return {string} - */ -proto.ErrorNotify.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ErrorNotify} returns this - */ -proto.ErrorNotify.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string Data = 6; - * @return {string} - */ -proto.ErrorNotify.prototype.getData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); -}; - - -/** - * @param {string} value - * @return {!proto.ErrorNotify} returns this - */ -proto.ErrorNotify.prototype.setData = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/js/pack/pack_db_pb.js b/src/pb/js/pack/pack_db_pb.js deleted file mode 100644 index 2364afb..0000000 --- a/src/pb/js/pack/pack_db_pb.js +++ /dev/null @@ -1,380 +0,0 @@ -// source: pack/pack_db.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 || window || global || self || Function('return this')(); }).call(null); - -goog.exportSymbol('proto.DB_UserItemData', 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.DB_UserItemData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.DB_UserItemData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.DB_UserItemData.displayName = 'proto.DB_UserItemData'; -} - - - -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_, 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.DB_UserItemData.prototype.toObject = function(opt_includeInstance) { - return proto.DB_UserItemData.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.DB_UserItemData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.DB_UserItemData.toObject = function(includeInstance, msg) { - var f, obj = { - gridid: jspb.Message.getFieldWithDefault(msg, 1, ""), - uid: jspb.Message.getFieldWithDefault(msg, 2, ""), - isempty: jspb.Message.getBooleanFieldWithDefault(msg, 3, false), - itemid: jspb.Message.getFieldWithDefault(msg, 4, 0), - amount: jspb.Message.getFieldWithDefault(msg, 5, 0), - ctime: jspb.Message.getFieldWithDefault(msg, 6, 0), - etime: jspb.Message.getFieldWithDefault(msg, 7, 0), - isnewitem: jspb.Message.getBooleanFieldWithDefault(msg, 8, 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.DB_UserItemData} - */ -proto.DB_UserItemData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.DB_UserItemData; - return proto.DB_UserItemData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.DB_UserItemData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.DB_UserItemData} - */ -proto.DB_UserItemData.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.setGridid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUid(value); - break; - case 3: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsempty(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt32()); - msg.setItemid(value); - break; - case 5: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAmount(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCtime(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEtime(value); - break; - case 8: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setIsnewitem(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.DB_UserItemData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.DB_UserItemData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.DB_UserItemData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.DB_UserItemData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGridid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIsempty(); - if (f) { - writer.writeBool( - 3, - f - ); - } - f = message.getItemid(); - if (f !== 0) { - writer.writeInt32( - 4, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeUint32( - 5, - f - ); - } - f = message.getCtime(); - if (f !== 0) { - writer.writeInt64( - 6, - f - ); - } - f = message.getEtime(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getIsnewitem(); - if (f) { - writer.writeBool( - 8, - f - ); - } -}; - - -/** - * optional string gridId = 1; - * @return {string} - */ -proto.DB_UserItemData.prototype.getGridid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_UserItemData} returns this - */ -proto.DB_UserItemData.prototype.setGridid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string uId = 2; - * @return {string} - */ -proto.DB_UserItemData.prototype.getUid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_UserItemData} returns this - */ -proto.DB_UserItemData.prototype.setUid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional bool isEmpty = 3; - * @return {boolean} - */ -proto.DB_UserItemData.prototype.getIsempty = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 3, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.DB_UserItemData} returns this - */ -proto.DB_UserItemData.prototype.setIsempty = function(value) { - return jspb.Message.setProto3BooleanField(this, 3, value); -}; - - -/** - * optional int32 itemId = 4; - * @return {number} - */ -proto.DB_UserItemData.prototype.getItemid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_UserItemData} returns this - */ -proto.DB_UserItemData.prototype.setItemid = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); -}; - - -/** - * optional uint32 amount = 5; - * @return {number} - */ -proto.DB_UserItemData.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_UserItemData} returns this - */ -proto.DB_UserItemData.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); -}; - - -/** - * optional int64 cTime = 6; - * @return {number} - */ -proto.DB_UserItemData.prototype.getCtime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_UserItemData} returns this - */ -proto.DB_UserItemData.prototype.setCtime = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 eTime = 7; - * @return {number} - */ -proto.DB_UserItemData.prototype.getEtime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_UserItemData} returns this - */ -proto.DB_UserItemData.prototype.setEtime = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional bool isNewItem = 8; - * @return {boolean} - */ -proto.DB_UserItemData.prototype.getIsnewitem = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 8, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.DB_UserItemData} returns this - */ -proto.DB_UserItemData.prototype.setIsnewitem = function(value) { - return jspb.Message.setProto3BooleanField(this, 8, value); -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/js/pack/pack_msg_pb.js b/src/pb/js/pack/pack_msg_pb.js deleted file mode 100644 index 44ef369..0000000 --- a/src/pb/js/pack/pack_msg_pb.js +++ /dev/null @@ -1,1024 +0,0 @@ -// source: pack/pack_msg.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 || window || global || self || Function('return this')(); }).call(null); - -var pack_pack_db_pb = require('../pack/pack_db_pb.js'); -goog.object.extend(proto, pack_pack_db_pb); -goog.exportSymbol('proto.Pack_Getlist_Req', null, global); -goog.exportSymbol('proto.Pack_Getlist_Resp', null, global); -goog.exportSymbol('proto.Pack_SellItem_Req', null, global); -goog.exportSymbol('proto.Pack_SellItem_Resp', null, global); -goog.exportSymbol('proto.Pack_UseItem_Req', null, global); -goog.exportSymbol('proto.Pack_UseItem_Resp', 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.Pack_Getlist_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Pack_Getlist_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Pack_Getlist_Req.displayName = 'proto.Pack_Getlist_Req'; -} -/** - * 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.Pack_Getlist_Resp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.Pack_Getlist_Resp.repeatedFields_, null); -}; -goog.inherits(proto.Pack_Getlist_Resp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Pack_Getlist_Resp.displayName = 'proto.Pack_Getlist_Resp'; -} -/** - * 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.Pack_UseItem_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Pack_UseItem_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Pack_UseItem_Req.displayName = 'proto.Pack_UseItem_Req'; -} -/** - * 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.Pack_UseItem_Resp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Pack_UseItem_Resp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Pack_UseItem_Resp.displayName = 'proto.Pack_UseItem_Resp'; -} -/** - * 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.Pack_SellItem_Req = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Pack_SellItem_Req, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Pack_SellItem_Req.displayName = 'proto.Pack_SellItem_Req'; -} -/** - * 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.Pack_SellItem_Resp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Pack_SellItem_Resp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Pack_SellItem_Resp.displayName = 'proto.Pack_SellItem_Resp'; -} - - - -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_, 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.Pack_Getlist_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Pack_Getlist_Req.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.Pack_Getlist_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_Getlist_Req.toObject = function(includeInstance, msg) { - var f, obj = { - itype: jspb.Message.getFieldWithDefault(msg, 1, 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.Pack_Getlist_Req} - */ -proto.Pack_Getlist_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Pack_Getlist_Req; - return proto.Pack_Getlist_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Pack_Getlist_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Pack_Getlist_Req} - */ -proto.Pack_Getlist_Req.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setItype(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Pack_Getlist_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Pack_Getlist_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Pack_Getlist_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_Getlist_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getItype(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } -}; - - -/** - * optional int32 IType = 1; - * @return {number} - */ -proto.Pack_Getlist_Req.prototype.getItype = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Pack_Getlist_Req} returns this - */ -proto.Pack_Getlist_Req.prototype.setItype = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.Pack_Getlist_Resp.repeatedFields_ = [1]; - - - -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_, 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.Pack_Getlist_Resp.prototype.toObject = function(opt_includeInstance) { - return proto.Pack_Getlist_Resp.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.Pack_Getlist_Resp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_Getlist_Resp.toObject = function(includeInstance, msg) { - var f, obj = { - gridsList: jspb.Message.toObjectList(msg.getGridsList(), - pack_pack_db_pb.DB_UserItemData.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.Pack_Getlist_Resp} - */ -proto.Pack_Getlist_Resp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Pack_Getlist_Resp; - return proto.Pack_Getlist_Resp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Pack_Getlist_Resp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Pack_Getlist_Resp} - */ -proto.Pack_Getlist_Resp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new pack_pack_db_pb.DB_UserItemData; - reader.readMessage(value,pack_pack_db_pb.DB_UserItemData.deserializeBinaryFromReader); - msg.addGrids(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Pack_Getlist_Resp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Pack_Getlist_Resp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Pack_Getlist_Resp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_Getlist_Resp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGridsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - pack_pack_db_pb.DB_UserItemData.serializeBinaryToWriter - ); - } -}; - - -/** - * repeated DB_UserItemData Grids = 1; - * @return {!Array} - */ -proto.Pack_Getlist_Resp.prototype.getGridsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, pack_pack_db_pb.DB_UserItemData, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.Pack_Getlist_Resp} returns this -*/ -proto.Pack_Getlist_Resp.prototype.setGridsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.DB_UserItemData=} opt_value - * @param {number=} opt_index - * @return {!proto.DB_UserItemData} - */ -proto.Pack_Getlist_Resp.prototype.addGrids = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.DB_UserItemData, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.Pack_Getlist_Resp} returns this - */ -proto.Pack_Getlist_Resp.prototype.clearGridsList = function() { - return this.setGridsList([]); -}; - - - - - -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_, 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.Pack_UseItem_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Pack_UseItem_Req.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.Pack_UseItem_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_UseItem_Req.toObject = function(includeInstance, msg) { - var f, obj = { - gridid: jspb.Message.getFieldWithDefault(msg, 1, 0), - itemid: jspb.Message.getFieldWithDefault(msg, 2, 0), - amount: jspb.Message.getFieldWithDefault(msg, 3, 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.Pack_UseItem_Req} - */ -proto.Pack_UseItem_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Pack_UseItem_Req; - return proto.Pack_UseItem_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Pack_UseItem_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Pack_UseItem_Req} - */ -proto.Pack_UseItem_Req.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setGridid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setItemid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Pack_UseItem_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Pack_UseItem_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Pack_UseItem_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_UseItem_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGridid(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getItemid(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional int32 GridId = 1; - * @return {number} - */ -proto.Pack_UseItem_Req.prototype.getGridid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Pack_UseItem_Req} returns this - */ -proto.Pack_UseItem_Req.prototype.setGridid = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 ItemId = 2; - * @return {number} - */ -proto.Pack_UseItem_Req.prototype.getItemid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Pack_UseItem_Req} returns this - */ -proto.Pack_UseItem_Req.prototype.setItemid = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 Amount = 3; - * @return {number} - */ -proto.Pack_UseItem_Req.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Pack_UseItem_Req} returns this - */ -proto.Pack_UseItem_Req.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(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_, 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.Pack_UseItem_Resp.prototype.toObject = function(opt_includeInstance) { - return proto.Pack_UseItem_Resp.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.Pack_UseItem_Resp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_UseItem_Resp.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.Pack_UseItem_Resp} - */ -proto.Pack_UseItem_Resp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Pack_UseItem_Resp; - return proto.Pack_UseItem_Resp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Pack_UseItem_Resp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Pack_UseItem_Resp} - */ -proto.Pack_UseItem_Resp.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.Pack_UseItem_Resp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Pack_UseItem_Resp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Pack_UseItem_Resp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_UseItem_Resp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -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_, 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.Pack_SellItem_Req.prototype.toObject = function(opt_includeInstance) { - return proto.Pack_SellItem_Req.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.Pack_SellItem_Req} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_SellItem_Req.toObject = function(includeInstance, msg) { - var f, obj = { - gridid: jspb.Message.getFieldWithDefault(msg, 1, 0), - itemid: jspb.Message.getFieldWithDefault(msg, 2, 0), - amount: jspb.Message.getFieldWithDefault(msg, 3, 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.Pack_SellItem_Req} - */ -proto.Pack_SellItem_Req.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Pack_SellItem_Req; - return proto.Pack_SellItem_Req.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Pack_SellItem_Req} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Pack_SellItem_Req} - */ -proto.Pack_SellItem_Req.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt32()); - msg.setGridid(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setItemid(value); - break; - case 3: - var value = /** @type {number} */ (reader.readUint32()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Pack_SellItem_Req.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Pack_SellItem_Req.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Pack_SellItem_Req} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_SellItem_Req.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getGridid(); - if (f !== 0) { - writer.writeInt32( - 1, - f - ); - } - f = message.getItemid(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } - f = message.getAmount(); - if (f !== 0) { - writer.writeUint32( - 3, - f - ); - } -}; - - -/** - * optional int32 GridId = 1; - * @return {number} - */ -proto.Pack_SellItem_Req.prototype.getGridid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Pack_SellItem_Req} returns this - */ -proto.Pack_SellItem_Req.prototype.setGridid = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); -}; - - -/** - * optional int32 ItemId = 2; - * @return {number} - */ -proto.Pack_SellItem_Req.prototype.getItemid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Pack_SellItem_Req} returns this - */ -proto.Pack_SellItem_Req.prototype.setItemid = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); -}; - - -/** - * optional uint32 Amount = 3; - * @return {number} - */ -proto.Pack_SellItem_Req.prototype.getAmount = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.Pack_SellItem_Req} returns this - */ -proto.Pack_SellItem_Req.prototype.setAmount = function(value) { - return jspb.Message.setProto3IntField(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_, 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.Pack_SellItem_Resp.prototype.toObject = function(opt_includeInstance) { - return proto.Pack_SellItem_Resp.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.Pack_SellItem_Resp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_SellItem_Resp.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.Pack_SellItem_Resp} - */ -proto.Pack_SellItem_Resp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Pack_SellItem_Resp; - return proto.Pack_SellItem_Resp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Pack_SellItem_Resp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Pack_SellItem_Resp} - */ -proto.Pack_SellItem_Resp.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.Pack_SellItem_Resp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Pack_SellItem_Resp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Pack_SellItem_Resp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Pack_SellItem_Resp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/js/user/user_db_pb.js b/src/pb/js/user/user_db_pb.js deleted file mode 100644 index 03bf3b7..0000000 --- a/src/pb/js/user/user_db_pb.js +++ /dev/null @@ -1,712 +0,0 @@ -// source: user/user_db.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 || window || global || self || Function('return this')(); }).call(null); - -goog.exportSymbol('proto.Cache_UserData', null, global); -goog.exportSymbol('proto.DB_UserData', 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.Cache_UserData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.Cache_UserData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.Cache_UserData.displayName = 'proto.Cache_UserData'; -} -/** - * 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.DB_UserData = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.DB_UserData, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.DB_UserData.displayName = 'proto.DB_UserData'; -} - - - -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_, 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.Cache_UserData.prototype.toObject = function(opt_includeInstance) { - return proto.Cache_UserData.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.Cache_UserData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Cache_UserData.toObject = function(includeInstance, msg) { - var f, obj = { - uid: jspb.Message.getFieldWithDefault(msg, 1, ""), - sessionid: jspb.Message.getFieldWithDefault(msg, 2, ""), - gatewayserviceid: 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.Cache_UserData} - */ -proto.Cache_UserData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.Cache_UserData; - return proto.Cache_UserData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.Cache_UserData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.Cache_UserData} - */ -proto.Cache_UserData.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.setUid(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSessionid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setGatewayserviceid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.Cache_UserData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.Cache_UserData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.Cache_UserData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.Cache_UserData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUid(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSessionid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getGatewayserviceid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } -}; - - -/** - * optional string uid = 1; - * @return {string} - */ -proto.Cache_UserData.prototype.getUid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Cache_UserData} returns this - */ -proto.Cache_UserData.prototype.setUid = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string SessionId = 2; - * @return {string} - */ -proto.Cache_UserData.prototype.getSessionid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Cache_UserData} returns this - */ -proto.Cache_UserData.prototype.setSessionid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string GatewayServiceId = 3; - * @return {string} - */ -proto.Cache_UserData.prototype.getGatewayserviceid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.Cache_UserData} returns this - */ -proto.Cache_UserData.prototype.setGatewayserviceid = 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_, 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.DB_UserData.prototype.toObject = function(opt_includeInstance) { - return proto.DB_UserData.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.DB_UserData} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.DB_UserData.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - uid: jspb.Message.getFieldWithDefault(msg, 2, ""), - uuid: jspb.Message.getFieldWithDefault(msg, 3, ""), - binduid: jspb.Message.getFieldWithDefault(msg, 4, ""), - name: jspb.Message.getFieldWithDefault(msg, 5, ""), - sid: jspb.Message.getFieldWithDefault(msg, 6, 0), - createip: jspb.Message.getFieldWithDefault(msg, 7, ""), - lastloginip: jspb.Message.getFieldWithDefault(msg, 8, ""), - ctime: jspb.Message.getFieldWithDefault(msg, 9, 0), - logintime: jspb.Message.getFieldWithDefault(msg, 10, 0), - friendpoint: jspb.Message.getFieldWithDefault(msg, 11, 0), - avatar: jspb.Message.getFieldWithDefault(msg, 12, 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.DB_UserData} - */ -proto.DB_UserData.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.DB_UserData; - return proto.DB_UserData.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.DB_UserData} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.DB_UserData} - */ -proto.DB_UserData.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.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUid(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setUuid(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setBinduid(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setSid(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setCreateip(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setLastloginip(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCtime(value); - break; - case 10: - var value = /** @type {number} */ (reader.readInt64()); - msg.setLogintime(value); - break; - case 11: - var value = /** @type {number} */ (reader.readInt32()); - msg.setFriendpoint(value); - break; - case 12: - var value = /** @type {number} */ (reader.readInt32()); - msg.setAvatar(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.DB_UserData.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.DB_UserData.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.DB_UserData} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.DB_UserData.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getUid(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getUuid(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getBinduid(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getSid(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getCreateip(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - f = message.getLastloginip(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getCtime(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getLogintime(); - if (f !== 0) { - writer.writeInt64( - 10, - f - ); - } - f = message.getFriendpoint(); - if (f !== 0) { - writer.writeInt32( - 11, - f - ); - } - f = message.getAvatar(); - if (f !== 0) { - writer.writeInt32( - 12, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.DB_UserData.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional string uid = 2; - * @return {string} - */ -proto.DB_UserData.prototype.getUid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setUid = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string uuid = 3; - * @return {string} - */ -proto.DB_UserData.prototype.getUuid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setUuid = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string binduid = 4; - * @return {string} - */ -proto.DB_UserData.prototype.getBinduid = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setBinduid = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - -/** - * optional string name = 5; - * @return {string} - */ -proto.DB_UserData.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); -}; - - -/** - * optional int32 sid = 6; - * @return {number} - */ -proto.DB_UserData.prototype.getSid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setSid = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional string createip = 7; - * @return {string} - */ -proto.DB_UserData.prototype.getCreateip = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setCreateip = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); -}; - - -/** - * optional string lastloginip = 8; - * @return {string} - */ -proto.DB_UserData.prototype.getLastloginip = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setLastloginip = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional int64 ctime = 9; - * @return {number} - */ -proto.DB_UserData.prototype.getCtime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setCtime = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional int64 logintime = 10; - * @return {number} - */ -proto.DB_UserData.prototype.getLogintime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setLogintime = function(value) { - return jspb.Message.setProto3IntField(this, 10, value); -}; - - -/** - * optional int32 friendPoint = 11; - * @return {number} - */ -proto.DB_UserData.prototype.getFriendpoint = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 11, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setFriendpoint = function(value) { - return jspb.Message.setProto3IntField(this, 11, value); -}; - - -/** - * optional int32 avatar = 12; - * @return {number} - */ -proto.DB_UserData.prototype.getAvatar = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.DB_UserData} returns this - */ -proto.DB_UserData.prototype.setAvatar = function(value) { - return jspb.Message.setProto3IntField(this, 12, value); -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/js/user/user_msg_pb.js b/src/pb/js/user/user_msg_pb.js deleted file mode 100644 index 8ca2615..0000000 --- a/src/pb/js/user/user_msg_pb.js +++ /dev/null @@ -1,1189 +0,0 @@ -// source: user/user_msg.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 || window || global || self || Function('return this')(); }).call(null); - -var errorcode_pb = require('../errorcode_pb.js'); -goog.object.extend(proto, errorcode_pb); -var user_user_db_pb = require('../user/user_db_pb.js'); -goog.object.extend(proto, user_user_db_pb); -goog.exportSymbol('proto.UserCreateReq', null, global); -goog.exportSymbol('proto.UserCreateRsp', null, global); -goog.exportSymbol('proto.UserLoadRsp', null, global); -goog.exportSymbol('proto.UserLoginReq', null, global); -goog.exportSymbol('proto.UserLoginResp', null, global); -goog.exportSymbol('proto.UserRegisterReq', null, global); -goog.exportSymbol('proto.UserRegisterRsp', 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.UserLoginReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.UserLoginReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.UserLoginReq.displayName = 'proto.UserLoginReq'; -} -/** - * 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.UserLoginResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.UserLoginResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.UserLoginResp.displayName = 'proto.UserLoginResp'; -} -/** - * 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.UserRegisterReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.UserRegisterReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.UserRegisterReq.displayName = 'proto.UserRegisterReq'; -} -/** - * 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.UserRegisterRsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.UserRegisterRsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.UserRegisterRsp.displayName = 'proto.UserRegisterRsp'; -} -/** - * 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.UserLoadRsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.UserLoadRsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.UserLoadRsp.displayName = 'proto.UserLoadRsp'; -} -/** - * 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.UserCreateReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.UserCreateReq, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.UserCreateReq.displayName = 'proto.UserCreateReq'; -} -/** - * 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.UserCreateRsp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.UserCreateRsp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.UserCreateRsp.displayName = 'proto.UserCreateRsp'; -} - - - -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_, 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.UserLoginReq.prototype.toObject = function(opt_includeInstance) { - return proto.UserLoginReq.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.UserLoginReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserLoginReq.toObject = function(includeInstance, msg) { - var f, obj = { - account: jspb.Message.getFieldWithDefault(msg, 1, ""), - sid: jspb.Message.getFieldWithDefault(msg, 2, 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.UserLoginReq} - */ -proto.UserLoginReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.UserLoginReq; - return proto.UserLoginReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.UserLoginReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.UserLoginReq} - */ -proto.UserLoginReq.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.setAccount(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setSid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.UserLoginReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.UserLoginReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.UserLoginReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserLoginReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSid(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional string account = 1; - * @return {string} - */ -proto.UserLoginReq.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.UserLoginReq} returns this - */ -proto.UserLoginReq.prototype.setAccount = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int32 sid = 2; - * @return {number} - */ -proto.UserLoginReq.prototype.getSid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.UserLoginReq} returns this - */ -proto.UserLoginReq.prototype.setSid = function(value) { - return jspb.Message.setProto3IntField(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_, 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.UserLoginResp.prototype.toObject = function(opt_includeInstance) { - return proto.UserLoginResp.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.UserLoginResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserLoginResp.toObject = function(includeInstance, msg) { - var f, obj = { - data: (f = msg.getData()) && user_user_db_pb.DB_UserData.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.UserLoginResp} - */ -proto.UserLoginResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.UserLoginResp; - return proto.UserLoginResp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.UserLoginResp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.UserLoginResp} - */ -proto.UserLoginResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new user_user_db_pb.DB_UserData; - reader.readMessage(value,user_user_db_pb.DB_UserData.deserializeBinaryFromReader); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.UserLoginResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.UserLoginResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.UserLoginResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserLoginResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f != null) { - writer.writeMessage( - 1, - f, - user_user_db_pb.DB_UserData.serializeBinaryToWriter - ); - } -}; - - -/** - * optional DB_UserData data = 1; - * @return {?proto.DB_UserData} - */ -proto.UserLoginResp.prototype.getData = function() { - return /** @type{?proto.DB_UserData} */ ( - jspb.Message.getWrapperField(this, user_user_db_pb.DB_UserData, 1)); -}; - - -/** - * @param {?proto.DB_UserData|undefined} value - * @return {!proto.UserLoginResp} returns this -*/ -proto.UserLoginResp.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.UserLoginResp} returns this - */ -proto.UserLoginResp.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.UserLoginResp.prototype.hasData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -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_, 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.UserRegisterReq.prototype.toObject = function(opt_includeInstance) { - return proto.UserRegisterReq.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.UserRegisterReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserRegisterReq.toObject = function(includeInstance, msg) { - var f, obj = { - account: jspb.Message.getFieldWithDefault(msg, 1, ""), - sid: jspb.Message.getFieldWithDefault(msg, 2, 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.UserRegisterReq} - */ -proto.UserRegisterReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.UserRegisterReq; - return proto.UserRegisterReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.UserRegisterReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.UserRegisterReq} - */ -proto.UserRegisterReq.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.setAccount(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt32()); - msg.setSid(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.UserRegisterReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.UserRegisterReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.UserRegisterReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserRegisterReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSid(); - if (f !== 0) { - writer.writeInt32( - 2, - f - ); - } -}; - - -/** - * optional string account = 1; - * @return {string} - */ -proto.UserRegisterReq.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.UserRegisterReq} returns this - */ -proto.UserRegisterReq.prototype.setAccount = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional int32 sid = 2; - * @return {number} - */ -proto.UserRegisterReq.prototype.getSid = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.UserRegisterReq} returns this - */ -proto.UserRegisterReq.prototype.setSid = function(value) { - return jspb.Message.setProto3IntField(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_, 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.UserRegisterRsp.prototype.toObject = function(opt_includeInstance) { - return proto.UserRegisterRsp.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.UserRegisterRsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserRegisterRsp.toObject = function(includeInstance, msg) { - var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - account: 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.UserRegisterRsp} - */ -proto.UserRegisterRsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.UserRegisterRsp; - return proto.UserRegisterRsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.UserRegisterRsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.UserRegisterRsp} - */ -proto.UserRegisterRsp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {!proto.ErrorCode} */ (reader.readEnum()); - msg.setCode(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAccount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.UserRegisterRsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.UserRegisterRsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.UserRegisterRsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserRegisterRsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getAccount(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional ErrorCode Code = 1; - * @return {!proto.ErrorCode} - */ -proto.UserRegisterRsp.prototype.getCode = function() { - return /** @type {!proto.ErrorCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.ErrorCode} value - * @return {!proto.UserRegisterRsp} returns this - */ -proto.UserRegisterRsp.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); -}; - - -/** - * optional string account = 2; - * @return {string} - */ -proto.UserRegisterRsp.prototype.getAccount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.UserRegisterRsp} returns this - */ -proto.UserRegisterRsp.prototype.setAccount = 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_, 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.UserLoadRsp.prototype.toObject = function(opt_includeInstance) { - return proto.UserLoadRsp.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.UserLoadRsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserLoadRsp.toObject = function(includeInstance, msg) { - var f, obj = { - data: (f = msg.getData()) && user_user_db_pb.Cache_UserData.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.UserLoadRsp} - */ -proto.UserLoadRsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.UserLoadRsp; - return proto.UserLoadRsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.UserLoadRsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.UserLoadRsp} - */ -proto.UserLoadRsp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new user_user_db_pb.Cache_UserData; - reader.readMessage(value,user_user_db_pb.Cache_UserData.deserializeBinaryFromReader); - msg.setData(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.UserLoadRsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.UserLoadRsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.UserLoadRsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserLoadRsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getData(); - if (f != null) { - writer.writeMessage( - 1, - f, - user_user_db_pb.Cache_UserData.serializeBinaryToWriter - ); - } -}; - - -/** - * optional Cache_UserData data = 1; - * @return {?proto.Cache_UserData} - */ -proto.UserLoadRsp.prototype.getData = function() { - return /** @type{?proto.Cache_UserData} */ ( - jspb.Message.getWrapperField(this, user_user_db_pb.Cache_UserData, 1)); -}; - - -/** - * @param {?proto.Cache_UserData|undefined} value - * @return {!proto.UserLoadRsp} returns this -*/ -proto.UserLoadRsp.prototype.setData = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.UserLoadRsp} returns this - */ -proto.UserLoadRsp.prototype.clearData = function() { - return this.setData(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.UserLoadRsp.prototype.hasData = function() { - return jspb.Message.getField(this, 1) != null; -}; - - - - - -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_, 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.UserCreateReq.prototype.toObject = function(opt_includeInstance) { - return proto.UserCreateReq.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.UserCreateReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserCreateReq.toObject = function(includeInstance, msg) { - var f, obj = { - nickname: 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.UserCreateReq} - */ -proto.UserCreateReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.UserCreateReq; - return proto.UserCreateReq.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.UserCreateReq} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.UserCreateReq} - */ -proto.UserCreateReq.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.setNickname(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.UserCreateReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.UserCreateReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.UserCreateReq} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserCreateReq.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNickname(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * optional string NickName = 1; - * @return {string} - */ -proto.UserCreateReq.prototype.getNickname = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.UserCreateReq} returns this - */ -proto.UserCreateReq.prototype.setNickname = 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_, 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.UserCreateRsp.prototype.toObject = function(opt_includeInstance) { - return proto.UserCreateRsp.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.UserCreateRsp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserCreateRsp.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.UserCreateRsp} - */ -proto.UserCreateRsp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.UserCreateRsp; - return proto.UserCreateRsp.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.UserCreateRsp} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.UserCreateRsp} - */ -proto.UserCreateRsp.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.UserCreateRsp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.UserCreateRsp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.UserCreateRsp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.UserCreateRsp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - -goog.object.extend(exports, proto); diff --git a/src/pb/proto.js b/src/pb/proto.js new file mode 100644 index 0000000..bab2565 --- /dev/null +++ b/src/pb/proto.js @@ -0,0 +1,861 @@ +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +"use strict"; + +var $protobuf = require("protobufjs/light"); + +var $root = ($protobuf.roots["default"] || ($protobuf.roots["default"] = new $protobuf.Root())) +.setOptions({ + go_package: ".;pb" +}) +.addJSON({ + UserMessage: { + fields: { + MainType: { + type: "string", + id: 1 + }, + SubType: { + type: "string", + id: 2 + }, + data: { + type: "google.protobuf.Any", + id: 3 + }, + sec: { + type: "string", + id: 4 + } + } + }, + AgentMessage: { + fields: { + Ip: { + type: "string", + id: 1 + }, + UserSessionId: { + type: "string", + id: 2 + }, + UserId: { + type: "string", + id: 3 + }, + GatewayServiceId: { + type: "string", + id: 4 + }, + Method: { + type: "string", + id: 5 + }, + Message: { + type: "google.protobuf.Any", + id: 6 + } + } + }, + RPCMessageReply: { + fields: { + Code: { + type: "ErrorCode", + id: 1 + }, + Message: { + type: "string", + id: 2 + }, + Data: { + type: "string", + id: 3 + } + } + }, + AgentBuildReq: { + fields: { + UserSessionId: { + type: "string", + id: 1 + }, + UserId: { + type: "string", + id: 2 + }, + WorkerId: { + type: "string", + id: 3 + } + } + }, + AgentUnBuildReq: { + fields: { + UserSessionId: { + type: "string", + id: 1 + } + } + }, + AgentSendMessageReq: { + fields: { + UserSessionId: { + type: "string", + id: 1 + }, + MainType: { + type: "string", + id: 2 + }, + SubType: { + type: "string", + id: 3 + }, + Data: { + type: "google.protobuf.Any", + id: 4 + } + } + }, + BatchMessageReq: { + fields: { + UserSessionIds: { + rule: "repeated", + type: "string", + id: 1 + }, + MainType: { + type: "string", + id: 2 + }, + SubType: { + type: "string", + id: 3 + }, + Data: { + type: "google.protobuf.Any", + id: 4 + } + } + }, + BroadCastMessageReq: { + fields: { + MainType: { + type: "string", + id: 1 + }, + SubType: { + type: "string", + id: 2 + }, + Data: { + type: "google.protobuf.Any", + id: 3 + } + } + }, + AgentCloseeReq: { + fields: { + UserSessionId: { + type: "string", + id: 1 + } + } + }, + ErrorCode: { + values: { + Success: 0, + NoFindService: 10, + NoFindServiceHandleFunc: 11, + RpcFuncExecutionError: 12, + CacheReadError: 13, + SqlExecutionError: 14, + ReqParameterError: 15, + SignError: 16, + InsufficientPermissions: 17, + NoLogin: 18, + UserSessionNobeing: 19, + StateInvalid: 20, + DBError: 21, + SystemError: 22, + Exception: 100, + SecKeyInvalid: 1000, + SecKey: 1001, + BindUser: 1002, + FriendNotSelf: 1100, + FriendSelfMax: 1101, + FriendTargetMax: 1102, + FriendSelfNoData: 1103, + FriendTargetNoData: 1104, + FriendYet: 1105, + FriendApplyYet: 1106, + FriendSelfBlackYet: 1107, + FriendTargetBlackYet: 1108, + FriendApplyError: 1109, + FriendBlackMax: 1110, + FriendSearchNameEmpty: 1111 + } + }, + google: { + nested: { + protobuf: { + nested: { + Any: { + fields: { + type_url: { + type: "string", + id: 1 + }, + value: { + type: "bytes", + id: 2 + } + } + } + } + } + } + }, + DB_FriendData: { + fields: { + uId: { + type: "string", + id: 1 + }, + friendIds: { + rule: "repeated", + type: "string", + id: 2 + }, + applyIds: { + rule: "repeated", + type: "string", + id: 3 + }, + blackIds: { + rule: "repeated", + type: "string", + id: 4 + } + } + }, + FriendBase: { + fields: { + userId: { + type: "string", + id: 1 + }, + NickName: { + type: "string", + id: 2 + }, + level: { + type: "int32", + id: 3 + }, + avatar: { + type: "int32", + id: 4 + }, + strength: { + type: "int64", + id: 5 + }, + serverId: { + type: "int32", + id: 6 + }, + offlineTime: { + type: "int64", + id: 7 + } + } + }, + Friend_List_Req: { + fields: {} + }, + Friend_List_Rsp: { + fields: { + list: { + rule: "repeated", + type: "FriendBase", + id: 1 + } + } + }, + Friend_Apply_Req: { + fields: { + friendId: { + type: "string", + id: 1 + } + } + }, + Friend_Apply_Rsp: { + fields: { + userId: { + type: "string", + id: 1 + }, + friendId: { + type: "string", + id: 2 + } + } + }, + Friend_Del_Req: { + fields: { + friendId: { + type: "string", + id: 1 + } + } + }, + Friend_Del_Rsp: { + fields: { + friendId: { + type: "string", + id: 1 + }, + userId: { + type: "string", + id: 2 + } + } + }, + Friend_Agree_Req: { + fields: { + friendIds: { + rule: "repeated", + type: "string", + id: 1 + } + } + }, + Friend_Agree_Rsp: { + fields: { + Num: { + type: "int32", + id: 1 + } + } + }, + Friend_Refuse_Req: { + fields: { + friendIds: { + rule: "repeated", + type: "string", + id: 1 + } + } + }, + Friend_Refuse_Rsp: { + fields: { + Num: { + type: "int32", + id: 1 + } + } + }, + Friend_ApplyList_Req: { + fields: {} + }, + Friend_ApplyList_Rsp: { + fields: { + list: { + rule: "repeated", + type: "FriendBase", + id: 1 + } + } + }, + Friend_Search_Req: { + fields: { + nickName: { + type: "string", + id: 1 + } + } + }, + Friend_Search_Rsp: { + fields: { + friend: { + type: "FriendBase", + id: 1 + } + } + }, + Friend_BlackList_Req: { + fields: {} + }, + Friend_BlackList_Rsp: { + fields: { + friends: { + rule: "repeated", + type: "FriendBase", + id: 1 + } + } + }, + Friend_BlackAdd_Req: { + fields: { + friendId: { + type: "string", + id: 1 + } + } + }, + Friend_BlackAdd_Rsp: { + fields: { + friendId: { + type: "string", + id: 1 + }, + userId: { + type: "string", + id: 2 + } + } + }, + Friend_DelBlack_Req: { + fields: { + friendId: { + type: "string", + id: 1 + } + } + }, + Friend_DelBlack_Rsp: { + fields: { + friendId: { + type: "string", + id: 1 + }, + userId: { + type: "string", + id: 2 + } + } + }, + Friend_Receive_Req: { + fields: { + friendId: { + type: "string", + id: 1 + } + } + }, + Friend_Receive_Rsp: { + fields: { + friendId: { + type: "string", + id: 1 + }, + userId: { + type: "string", + id: 2 + } + } + }, + Friend_Give_Req: { + fields: { + friendId: { + type: "string", + id: 1 + } + } + }, + Friend_Give_Rsp: { + fields: { + friendId: { + type: "string", + id: 1 + }, + userId: { + type: "string", + id: 2 + } + } + }, + Friend_Total_Req: { + fields: { + friendId: { + type: "string", + id: 1 + } + } + }, + Friend_Total_Rsp: { + fields: { + friendId: { + type: "string", + id: 1 + }, + total: { + type: "int32", + id: 2 + } + } + }, + MailAttachment: { + fields: { + ItemId: { + type: "uint32", + id: 1 + }, + ItemCount: { + type: "uint32", + id: 2 + } + } + }, + DB_MailData: { + fields: { + ObjId: { + type: "string", + id: 1 + }, + Uid: { + type: "string", + id: 2 + }, + Title: { + type: "string", + id: 3 + }, + Contex: { + type: "string", + id: 4 + }, + CreateTime: { + type: "uint64", + id: 5 + }, + DueTime: { + type: "uint64", + id: 6 + }, + Check: { + type: "bool", + id: 7 + }, + Reward: { + type: "bool", + id: 8 + }, + Items: { + rule: "repeated", + type: "MailAttachment", + id: 9 + } + } + }, + Mail_GetList_Req: { + fields: {} + }, + Mail_GetList_Resp: { + fields: { + Mails: { + rule: "repeated", + type: "DB_MailData", + id: 1 + } + } + }, + Mail_ReadMail_Req: { + fields: { + ObjID: { + type: "string", + id: 1 + } + } + }, + Mail_ReadMail_Resp: { + fields: { + Mail: { + type: "DB_MailData", + id: 1 + } + } + }, + Mail_GetUserMailAttachment_Req: { + fields: { + ObjID: { + type: "string", + id: 1 + } + } + }, + Mail_GetUserMailAttachment_Resp: { + fields: { + Mail: { + type: "DB_MailData", + id: 1 + } + } + }, + Mail_DelMail_Req: { + fields: { + ObjID: { + type: "string", + id: 1 + } + } + }, + Mail_DelMail_Resp: { + fields: { + Mail: { + rule: "repeated", + type: "DB_MailData", + id: 1 + } + } + }, + ErrorNotify: { + fields: { + ReqMainType: { + type: "string", + id: 1 + }, + ReqSubType: { + type: "string", + id: 2 + }, + Code: { + type: "ErrorCode", + id: 3 + }, + Message: { + type: "string", + id: 4 + }, + Data: { + type: "string", + id: 6 + } + } + }, + DB_UserItemData: { + fields: { + gridId: { + type: "string", + id: 1 + }, + uId: { + type: "string", + id: 2 + }, + isEmpty: { + type: "bool", + id: 3 + }, + itemId: { + type: "int32", + id: 4 + }, + amount: { + type: "uint32", + id: 5 + }, + cTime: { + type: "int64", + id: 6 + }, + eTime: { + type: "int64", + id: 7 + }, + isNewItem: { + type: "bool", + id: 8 + } + } + }, + Pack_Getlist_Req: { + fields: { + IType: { + type: "int32", + id: 1 + } + } + }, + Pack_Getlist_Resp: { + fields: { + Grids: { + rule: "repeated", + type: "DB_UserItemData", + id: 1 + } + } + }, + Pack_UseItem_Req: { + fields: { + GridId: { + type: "int32", + id: 1 + }, + ItemId: { + type: "int32", + id: 2 + }, + Amount: { + type: "uint32", + id: 3 + } + } + }, + Pack_UseItem_Resp: { + fields: {} + }, + Pack_SellItem_Req: { + fields: { + GridId: { + type: "int32", + id: 1 + }, + ItemId: { + type: "int32", + id: 2 + }, + Amount: { + type: "uint32", + id: 3 + } + } + }, + Pack_SellItem_Resp: { + fields: {} + }, + Cache_UserData: { + fields: { + uid: { + type: "string", + id: 1 + }, + SessionId: { + type: "string", + id: 2 + }, + GatewayServiceId: { + type: "string", + id: 3 + } + } + }, + DB_UserData: { + fields: { + id: { + type: "string", + id: 1 + }, + uid: { + type: "string", + id: 2 + }, + uuid: { + type: "string", + id: 3 + }, + binduid: { + type: "string", + id: 4 + }, + name: { + type: "string", + id: 5 + }, + sid: { + type: "int32", + id: 6 + }, + createip: { + type: "string", + id: 7 + }, + lastloginip: { + type: "string", + id: 8 + }, + ctime: { + type: "int64", + id: 9 + }, + logintime: { + type: "int64", + id: 10 + }, + friendPoint: { + type: "int32", + id: 11 + }, + avatar: { + type: "int32", + id: 12 + } + } + }, + UserLoginReq: { + fields: { + account: { + type: "string", + id: 1 + }, + sid: { + type: "int32", + id: 2 + } + } + }, + UserLoginResp: { + fields: { + data: { + type: "DB_UserData", + id: 1 + } + } + }, + UserRegisterReq: { + fields: { + account: { + type: "string", + id: 1 + }, + sid: { + type: "int32", + id: 2 + } + } + }, + UserRegisterRsp: { + fields: { + Code: { + type: "ErrorCode", + id: 1 + }, + account: { + type: "string", + id: 2 + } + } + }, + UserLoadRsp: { + fields: { + data: { + type: "Cache_UserData", + id: 1 + } + } + }, + UserCreateReq: { + fields: { + NickName: { + type: "string", + id: 1 + } + } + }, + UserCreateRsp: { + fields: {} + } +}); + +module.exports = $root; diff --git a/src/pb/proto/friend/friend_db.proto b/src/pb/proto/friend_db.proto similarity index 100% rename from src/pb/proto/friend/friend_db.proto rename to src/pb/proto/friend_db.proto diff --git a/src/pb/proto/friend/friend_msg.proto b/src/pb/proto/friend_msg.proto similarity index 100% rename from src/pb/proto/friend/friend_msg.proto rename to src/pb/proto/friend_msg.proto diff --git a/src/pb/proto/mail/mail_db.proto b/src/pb/proto/mail_db.proto similarity index 100% rename from src/pb/proto/mail/mail_db.proto rename to src/pb/proto/mail_db.proto diff --git a/src/pb/proto/mail/mail_msg.proto b/src/pb/proto/mail_msg.proto similarity index 95% rename from src/pb/proto/mail/mail_msg.proto rename to src/pb/proto/mail_msg.proto index 5f28858..60dce61 100644 --- a/src/pb/proto/mail/mail_msg.proto +++ b/src/pb/proto/mail_msg.proto @@ -1,6 +1,6 @@ syntax = "proto3"; option go_package = ".;pb"; -import "mail/mail_db.proto"; +import "mail_db.proto"; message Mail_GetList_Req { diff --git a/src/pb/proto/notify/notify_msg.proto b/src/pb/proto/notify_msg.proto similarity index 100% rename from src/pb/proto/notify/notify_msg.proto rename to src/pb/proto/notify_msg.proto diff --git a/src/pb/proto/pack/pack_db.proto b/src/pb/proto/pack_db.proto similarity index 100% rename from src/pb/proto/pack/pack_db.proto rename to src/pb/proto/pack_db.proto diff --git a/src/pb/proto/pack/pack_msg.proto b/src/pb/proto/pack_msg.proto similarity index 96% rename from src/pb/proto/pack/pack_msg.proto rename to src/pb/proto/pack_msg.proto index 8f5ce51..6ea8c5b 100644 --- a/src/pb/proto/pack/pack_msg.proto +++ b/src/pb/proto/pack_msg.proto @@ -1,6 +1,6 @@ syntax = "proto3"; option go_package = ".;pb"; -import "pack/pack_db.proto"; +import "pack_db.proto"; //查询用户背包请求 message Pack_Getlist_Req { diff --git a/src/pb/proto/user/user_db.proto b/src/pb/proto/user_db.proto similarity index 100% rename from src/pb/proto/user/user_db.proto rename to src/pb/proto/user_db.proto diff --git a/src/pb/proto/user/user_msg.proto b/src/pb/proto/user_msg.proto similarity index 94% rename from src/pb/proto/user/user_msg.proto rename to src/pb/proto/user_msg.proto index 8dd77e4..0e8327a 100644 --- a/src/pb/proto/user/user_msg.proto +++ b/src/pb/proto/user_msg.proto @@ -1,7 +1,7 @@ syntax = "proto3"; option go_package = ".;pb"; import "errorcode.proto"; -import "user/user_db.proto"; +import "user_db.proto"; //用户登录 message UserLoginReq { diff --git a/src/utils/socket.js b/src/utils/socket.js index 7c572bf..8eb2cc9 100644 --- a/src/utils/socket.js +++ b/src/utils/socket.js @@ -1,6 +1,3 @@ -// 在Vue中使用,不需要可以去除以下引用 -import Vue from 'vue' -import storage from 'store' // 导出socket对象 export { @@ -34,60 +31,14 @@ var socket = { /** * 初始化连接 */ - init: () => { - if (!("WebSocket" in window)) { - console.log('浏览器不支持WebSocket') - return null - } - - // 已经创建过连接不再重复创建 - if (socket.websock) { - return socket.websock - } - - socket.websock = new WebSocket(socket.ws_url) - socket.websock.onmessage = function (e) { - socket.receive(e) - } - - // 关闭连接 - socket.websock.onclose = function (e) { - console.log('连接已断开') - console.log('connection closed (' + e.code + ')') - clearInterval(socket.hearbeat_interval) - socket.socket_open = false - - // 需要重新连接 - if (socket.is_reonnect) { - socket.reconnect_timer = setTimeout(() => { - // 超过重连次数 - if (socket.reconnect_current > socket.reconnect_count) { - clearTimeout(socket.reconnect_timer) - return - } - - // 记录重连次数 - socket.reconnect_current++ - socket.reconnect() - }, socket.reconnect_interval) - } - } - - // 连接成功 - socket.websock.onopen = function () { - console.log('连接成功') - socket.socket_open = true - socket.is_reonnect = true - // 开启心跳 - socket.heartbeat() - } - - // 连接发生错误 - socket.websock.onerror = function () { - console.log('WebSocket连接发生错误') - } + init: (ws_url) => { + socket.ws_url = ws_url ? ws_url : socket.ws_url + return new Promise(socket.connect) }, + + + /** * 发送消息 * @param {*} data 发送数据 @@ -214,15 +165,63 @@ var socket = { }, /** - * 重新连接 + * 连接 */ - reconnect: () => { - console.log('发起重新连接', socket.reconnect_current) + connect: (resolve, reject) => { + console.log('连接服务器 连接次数', socket.reconnect_current) - if (socket.websock && socket.socket_open) { - socket.websock.close() + if (!("WebSocket" in window)) { + console.log('浏览器不支持WebSocket') + return reject("浏览器不支持WebSocket") + } + // 已经创建过连接不再重复创建 + if (socket.websock) { + return resolve(socket.websock) + } + socket.websock = new WebSocket(socket.ws_url) + socket.websock.onmessage = function (e) { + socket.receive(e) + } + // 关闭连接 + socket.websock.onclose = function (e) { + console.log('连接已断开') + console.log('connection closed (' + e.code + ')') + clearInterval(socket.hearbeat_interval) + socket.socket_open = false + socket.websock = null + // 需要重新连接 + if (socket.is_reonnect) { + socket.reconnect_timer = setTimeout(() => { + // 超过重连次数 + if (socket.reconnect_current > socket.reconnect_count) { + clearTimeout(socket.reconnect_timer) + return reject("超过重连次数") + } + + // 记录重连次数 + socket.reconnect_current++ + return socket.connect(resolve, reject) + }, socket.reconnect_interval) + } } - socket.init() + // 连接成功 + socket.websock.onopen = function () { + console.log('连接成功') + socket.reconnect_current = 0 + socket.socket_open = true + socket.is_reonnect = true + // 开启心跳 + socket.heartbeat() + resolve(socket.websock) + } + // 连接发生错误 + socket.websock.onerror = function () { + socket.websock = null + console.log('WebSocket连接发生错误') + // reject("WebSocket连接发生错误") + } + + }, } \ No newline at end of file diff --git a/src/views/protocol/Index.vue b/src/views/protocol/Index.vue index 9a5ac7f..aed9a72 100644 --- a/src/views/protocol/Index.vue +++ b/src/views/protocol/Index.vue @@ -1,16 +1,119 @@