1268 lines
35 KiB
JavaScript
Raw Normal View History

2025-07-01 22:52:45 +08:00
// source: login.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 =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof window !== 'undefined' && window) ||
(typeof global !== 'undefined' && global) ||
(typeof self !== 'undefined' && self) ||
(function () { return this; }).call(null) ||
Function('return this')();
var code_pb = require('./code_pb.js');
goog.object.extend(proto, code_pb);
goog.exportSymbol('proto.pb.NtfUserInService', null, global);
goog.exportSymbol('proto.pb.NtfUserOffline', null, global);
goog.exportSymbol('proto.pb.NtfUserOnline', null, global);
goog.exportSymbol('proto.pb.ReqUserLogin', null, global);
goog.exportSymbol('proto.pb.ReqUserLogout', null, global);
goog.exportSymbol('proto.pb.RspUserLogin', null, global);
goog.exportSymbol('proto.pb.RspUserLogout', 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.pb.ReqUserLogin = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.pb.ReqUserLogin, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.pb.ReqUserLogin.displayName = 'proto.pb.ReqUserLogin';
}
/**
* 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.pb.RspUserLogin = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.pb.RspUserLogin, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.pb.RspUserLogin.displayName = 'proto.pb.RspUserLogin';
}
/**
* 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.pb.NtfUserOnline = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.pb.NtfUserOnline, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.pb.NtfUserOnline.displayName = 'proto.pb.NtfUserOnline';
}
/**
* 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.pb.NtfUserInService = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.NtfUserInService.repeatedFields_, null);
};
goog.inherits(proto.pb.NtfUserInService, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.pb.NtfUserInService.displayName = 'proto.pb.NtfUserInService';
}
/**
* 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.pb.ReqUserLogout = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.pb.ReqUserLogout, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.pb.ReqUserLogout.displayName = 'proto.pb.ReqUserLogout';
}
/**
* 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.pb.RspUserLogout = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.pb.RspUserLogout, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.pb.RspUserLogout.displayName = 'proto.pb.RspUserLogout';
}
/**
* 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.pb.NtfUserOffline = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.pb.NtfUserOffline, jspb.Message);
if (goog.DEBUG && !COMPILED) {
/**
* @public
* @override
*/
proto.pb.NtfUserOffline.displayName = 'proto.pb.NtfUserOffline';
}
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.pb.ReqUserLogin.prototype.toObject = function(opt_includeInstance) {
return proto.pb.ReqUserLogin.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.pb.ReqUserLogin} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.ReqUserLogin.toObject = function(includeInstance, msg) {
var f, obj = {
username: jspb.Message.getFieldWithDefault(msg, 1, ""),
password: jspb.Message.getFieldWithDefault(msg, 2, ""),
ip: jspb.Message.getFieldWithDefault(msg, 3, ""),
deviceId: jspb.Message.getFieldWithDefault(msg, 4, ""),
version: jspb.Message.getFieldWithDefault(msg, 10, "")
};
if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}
/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.pb.ReqUserLogin}
*/
proto.pb.ReqUserLogin.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pb.ReqUserLogin;
return proto.pb.ReqUserLogin.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pb.ReqUserLogin} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pb.ReqUserLogin}
*/
proto.pb.ReqUserLogin.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.setUsername(value);
break;
case 2:
var value = /** @type {string} */ (reader.readString());
msg.setPassword(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setIp(value);
break;
case 4:
var value = /** @type {string} */ (reader.readString());
msg.setDeviceId(value);
break;
case 10:
var value = /** @type {string} */ (reader.readString());
msg.setVersion(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pb.ReqUserLogin.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pb.ReqUserLogin.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pb.ReqUserLogin} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.ReqUserLogin.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUsername();
if (f.length > 0) {
writer.writeString(
1,
f
);
}
f = message.getPassword();
if (f.length > 0) {
writer.writeString(
2,
f
);
}
f = message.getIp();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
f = message.getDeviceId();
if (f.length > 0) {
writer.writeString(
4,
f
);
}
f = message.getVersion();
if (f.length > 0) {
writer.writeString(
10,
f
);
}
};
/**
* optional string username = 1;
* @return {string}
*/
proto.pb.ReqUserLogin.prototype.getUsername = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
};
/**
* @param {string} value
* @return {!proto.pb.ReqUserLogin} returns this
*/
proto.pb.ReqUserLogin.prototype.setUsername = function(value) {
return jspb.Message.setProto3StringField(this, 1, value);
};
/**
* optional string password = 2;
* @return {string}
*/
proto.pb.ReqUserLogin.prototype.getPassword = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
};
/**
* @param {string} value
* @return {!proto.pb.ReqUserLogin} returns this
*/
proto.pb.ReqUserLogin.prototype.setPassword = function(value) {
return jspb.Message.setProto3StringField(this, 2, value);
};
/**
* optional string ip = 3;
* @return {string}
*/
proto.pb.ReqUserLogin.prototype.getIp = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.pb.ReqUserLogin} returns this
*/
proto.pb.ReqUserLogin.prototype.setIp = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
/**
* optional string device_id = 4;
* @return {string}
*/
proto.pb.ReqUserLogin.prototype.getDeviceId = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
};
/**
* @param {string} value
* @return {!proto.pb.ReqUserLogin} returns this
*/
proto.pb.ReqUserLogin.prototype.setDeviceId = function(value) {
return jspb.Message.setProto3StringField(this, 4, value);
};
/**
* optional string version = 10;
* @return {string}
*/
proto.pb.ReqUserLogin.prototype.getVersion = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
};
/**
* @param {string} value
* @return {!proto.pb.ReqUserLogin} returns this
*/
proto.pb.ReqUserLogin.prototype.setVersion = function(value) {
return jspb.Message.setProto3StringField(this, 10, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.pb.RspUserLogin.prototype.toObject = function(opt_includeInstance) {
return proto.pb.RspUserLogin.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.pb.RspUserLogin} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.RspUserLogin.toObject = function(includeInstance, msg) {
var f, obj = {
code: jspb.Message.getFieldWithDefault(msg, 1, 0),
userId: jspb.Message.getFieldWithDefault(msg, 2, 0),
token: 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.pb.RspUserLogin}
*/
proto.pb.RspUserLogin.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pb.RspUserLogin;
return proto.pb.RspUserLogin.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pb.RspUserLogin} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pb.RspUserLogin}
*/
proto.pb.RspUserLogin.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.pb.ErrCode} */ (reader.readEnum());
msg.setCode(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setUserId(value);
break;
case 3:
var value = /** @type {string} */ (reader.readString());
msg.setToken(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pb.RspUserLogin.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pb.RspUserLogin.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pb.RspUserLogin} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.RspUserLogin.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCode();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
f = message.getUserId();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
f = message.getToken();
if (f.length > 0) {
writer.writeString(
3,
f
);
}
};
/**
* optional ErrCode code = 1;
* @return {!proto.pb.ErrCode}
*/
proto.pb.RspUserLogin.prototype.getCode = function() {
return /** @type {!proto.pb.ErrCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.pb.ErrCode} value
* @return {!proto.pb.RspUserLogin} returns this
*/
proto.pb.RspUserLogin.prototype.setCode = function(value) {
return jspb.Message.setProto3EnumField(this, 1, value);
};
/**
* optional int64 user_id = 2;
* @return {number}
*/
proto.pb.RspUserLogin.prototype.getUserId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.pb.RspUserLogin} returns this
*/
proto.pb.RspUserLogin.prototype.setUserId = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* optional string token = 3;
* @return {string}
*/
proto.pb.RspUserLogin.prototype.getToken = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
};
/**
* @param {string} value
* @return {!proto.pb.RspUserLogin} returns this
*/
proto.pb.RspUserLogin.prototype.setToken = function(value) {
return jspb.Message.setProto3StringField(this, 3, value);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.pb.NtfUserOnline.prototype.toObject = function(opt_includeInstance) {
return proto.pb.NtfUserOnline.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.pb.NtfUserOnline} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.NtfUserOnline.toObject = function(includeInstance, msg) {
var f, obj = {
userId: 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.pb.NtfUserOnline}
*/
proto.pb.NtfUserOnline.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pb.NtfUserOnline;
return proto.pb.NtfUserOnline.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pb.NtfUserOnline} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pb.NtfUserOnline}
*/
proto.pb.NtfUserOnline.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setUserId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pb.NtfUserOnline.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pb.NtfUserOnline.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pb.NtfUserOnline} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.NtfUserOnline.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUserId();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
};
/**
* optional int64 user_id = 2;
* @return {number}
*/
proto.pb.NtfUserOnline.prototype.getUserId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.pb.NtfUserOnline} returns this
*/
proto.pb.NtfUserOnline.prototype.setUserId = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
/**
* List of repeated fields within this message type.
* @private {!Array<number>}
* @const
*/
proto.pb.NtfUserInService.repeatedFields_ = [3];
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.pb.NtfUserInService.prototype.toObject = function(opt_includeInstance) {
return proto.pb.NtfUserInService.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.pb.NtfUserInService} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.NtfUserInService.toObject = function(includeInstance, msg) {
var f, obj = {
servicenamesList: (f = jspb.Message.getRepeatedField(msg, 3)) == 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.pb.NtfUserInService}
*/
proto.pb.NtfUserInService.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pb.NtfUserInService;
return proto.pb.NtfUserInService.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pb.NtfUserInService} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pb.NtfUserInService}
*/
proto.pb.NtfUserInService.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 3:
var value = /** @type {string} */ (reader.readString());
msg.addServicenames(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pb.NtfUserInService.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pb.NtfUserInService.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pb.NtfUserInService} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.NtfUserInService.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getServicenamesList();
if (f.length > 0) {
writer.writeRepeatedString(
3,
f
);
}
};
/**
* repeated string serviceNames = 3;
* @return {!Array<string>}
*/
proto.pb.NtfUserInService.prototype.getServicenamesList = function() {
return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
};
/**
* @param {!Array<string>} value
* @return {!proto.pb.NtfUserInService} returns this
*/
proto.pb.NtfUserInService.prototype.setServicenamesList = function(value) {
return jspb.Message.setField(this, 3, value || []);
};
/**
* @param {string} value
* @param {number=} opt_index
* @return {!proto.pb.NtfUserInService} returns this
*/
proto.pb.NtfUserInService.prototype.addServicenames = function(value, opt_index) {
return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
};
/**
* Clears the list making it empty but non-null.
* @return {!proto.pb.NtfUserInService} returns this
*/
proto.pb.NtfUserInService.prototype.clearServicenamesList = function() {
return this.setServicenamesList([]);
};
if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* Optional fields that are not set will be set to undefined.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.pb.ReqUserLogout.prototype.toObject = function(opt_includeInstance) {
return proto.pb.ReqUserLogout.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.pb.ReqUserLogout} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.ReqUserLogout.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.pb.ReqUserLogout}
*/
proto.pb.ReqUserLogout.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pb.ReqUserLogout;
return proto.pb.ReqUserLogout.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pb.ReqUserLogout} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pb.ReqUserLogout}
*/
proto.pb.ReqUserLogout.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.pb.ReqUserLogout.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pb.ReqUserLogout.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pb.ReqUserLogout} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.ReqUserLogout.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_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.pb.RspUserLogout.prototype.toObject = function(opt_includeInstance) {
return proto.pb.RspUserLogout.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.pb.RspUserLogout} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.RspUserLogout.toObject = function(includeInstance, msg) {
var f, obj = {
code: 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.pb.RspUserLogout}
*/
proto.pb.RspUserLogout.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pb.RspUserLogout;
return proto.pb.RspUserLogout.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pb.RspUserLogout} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pb.RspUserLogout}
*/
proto.pb.RspUserLogout.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {!proto.pb.ErrCode} */ (reader.readEnum());
msg.setCode(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pb.RspUserLogout.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pb.RspUserLogout.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pb.RspUserLogout} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.RspUserLogout.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getCode();
if (f !== 0.0) {
writer.writeEnum(
1,
f
);
}
};
/**
* optional ErrCode code = 1;
* @return {!proto.pb.ErrCode}
*/
proto.pb.RspUserLogout.prototype.getCode = function() {
return /** @type {!proto.pb.ErrCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};
/**
* @param {!proto.pb.ErrCode} value
* @return {!proto.pb.RspUserLogout} returns this
*/
proto.pb.RspUserLogout.prototype.setCode = function(value) {
return jspb.Message.setProto3EnumField(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_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
* JSPB instance for transitional soy proto support:
* http://goto/soy-param-migration
* @return {!Object}
*/
proto.pb.NtfUserOffline.prototype.toObject = function(opt_includeInstance) {
return proto.pb.NtfUserOffline.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.pb.NtfUserOffline} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.NtfUserOffline.toObject = function(includeInstance, msg) {
var f, obj = {
userId: 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.pb.NtfUserOffline}
*/
proto.pb.NtfUserOffline.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.pb.NtfUserOffline;
return proto.pb.NtfUserOffline.deserializeBinaryFromReader(msg, reader);
};
/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.pb.NtfUserOffline} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.pb.NtfUserOffline}
*/
proto.pb.NtfUserOffline.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 2:
var value = /** @type {number} */ (reader.readInt64());
msg.setUserId(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};
/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.pb.NtfUserOffline.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.pb.NtfUserOffline.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};
/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.pb.NtfUserOffline} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.pb.NtfUserOffline.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getUserId();
if (f !== 0) {
writer.writeInt64(
2,
f
);
}
};
/**
* optional int64 user_id = 2;
* @return {number}
*/
proto.pb.NtfUserOffline.prototype.getUserId = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};
/**
* @param {number} value
* @return {!proto.pb.NtfUserOffline} returns this
*/
proto.pb.NtfUserOffline.prototype.setUserId = function(value) {
return jspb.Message.setProto3IntField(this, 2, value);
};
goog.object.extend(exports, proto.pb);