// source: match.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); var user_pb = require('./user_pb.js'); goog.object.extend(proto, user_pb); var service_pb = require('./service_pb.js'); goog.object.extend(proto, service_pb); goog.exportSymbol('proto.pb.NotifyUserEnterRoom', null, global); goog.exportSymbol('proto.pb.ReqMatchRoom', null, global); goog.exportSymbol('proto.pb.RspMatchRoom', null, global); goog.exportSymbol('proto.pb.RspMatchRoom.ColorInfo', 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.ReqMatchRoom = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.pb.ReqMatchRoom, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.pb.ReqMatchRoom.displayName = 'proto.pb.ReqMatchRoom'; } /** * 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.RspMatchRoom = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.pb.RspMatchRoom, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.pb.RspMatchRoom.displayName = 'proto.pb.RspMatchRoom'; } /** * 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.RspMatchRoom.ColorInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.pb.RspMatchRoom.ColorInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.pb.RspMatchRoom.ColorInfo.displayName = 'proto.pb.RspMatchRoom.ColorInfo'; } /** * 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.NotifyUserEnterRoom = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.NotifyUserEnterRoom.repeatedFields_, null); }; goog.inherits(proto.pb.NotifyUserEnterRoom, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ proto.pb.NotifyUserEnterRoom.displayName = 'proto.pb.NotifyUserEnterRoom'; } 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.pb.ReqMatchRoom.prototype.toObject = function(opt_includeInstance) { return proto.pb.ReqMatchRoom.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.ReqMatchRoom} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.pb.ReqMatchRoom.toObject = function(includeInstance, msg) { var f, obj = { gameid: jspb.Message.getFieldWithDefault(msg, 1, 0), roomtype: 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.ReqMatchRoom} */ proto.pb.ReqMatchRoom.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.pb.ReqMatchRoom; return proto.pb.ReqMatchRoom.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.pb.ReqMatchRoom} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.pb.ReqMatchRoom} */ proto.pb.ReqMatchRoom.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = /** @type {!proto.pb.ServiceTypeId} */ (reader.readEnum()); msg.setGameid(value); break; case 2: var value = /** @type {number} */ (reader.readInt32()); msg.setRoomtype(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.pb.ReqMatchRoom.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.pb.ReqMatchRoom.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.ReqMatchRoom} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.pb.ReqMatchRoom.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getGameid(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getRoomtype(); if (f !== 0) { writer.writeInt32( 2, f ); } }; /** * optional ServiceTypeId gameId = 1; * @return {!proto.pb.ServiceTypeId} */ proto.pb.ReqMatchRoom.prototype.getGameid = function() { return /** @type {!proto.pb.ServiceTypeId} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.pb.ServiceTypeId} value * @return {!proto.pb.ReqMatchRoom} returns this */ proto.pb.ReqMatchRoom.prototype.setGameid = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional int32 roomType = 2; * @return {number} */ proto.pb.ReqMatchRoom.prototype.getRoomtype = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {number} value * @return {!proto.pb.ReqMatchRoom} returns this */ proto.pb.ReqMatchRoom.prototype.setRoomtype = 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.pb.RspMatchRoom.prototype.toObject = function(opt_includeInstance) { return proto.pb.RspMatchRoom.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.RspMatchRoom} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.pb.RspMatchRoom.toObject = function(includeInstance, msg) { var f, obj = { code: jspb.Message.getFieldWithDefault(msg, 1, 0), gameid: jspb.Message.getFieldWithDefault(msg, 2, 0), roomtype: jspb.Message.getFieldWithDefault(msg, 3, 0), user: (f = msg.getUser()) && user_pb.GameUser.toObject(includeInstance, f), colorinfo: (f = msg.getColorinfo()) && proto.pb.RspMatchRoom.ColorInfo.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.pb.RspMatchRoom} */ proto.pb.RspMatchRoom.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.pb.RspMatchRoom; return proto.pb.RspMatchRoom.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.pb.RspMatchRoom} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.pb.RspMatchRoom} */ proto.pb.RspMatchRoom.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 {!proto.pb.ServiceTypeId} */ (reader.readEnum()); msg.setGameid(value); break; case 3: var value = /** @type {number} */ (reader.readInt32()); msg.setRoomtype(value); break; case 4: var value = new user_pb.GameUser; reader.readMessage(value,user_pb.GameUser.deserializeBinaryFromReader); msg.setUser(value); break; case 20: var value = new proto.pb.RspMatchRoom.ColorInfo; reader.readMessage(value,proto.pb.RspMatchRoom.ColorInfo.deserializeBinaryFromReader); msg.setColorinfo(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.pb.RspMatchRoom.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.pb.RspMatchRoom.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.RspMatchRoom} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.pb.RspMatchRoom.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getCode(); if (f !== 0.0) { writer.writeEnum( 1, f ); } f = message.getGameid(); if (f !== 0.0) { writer.writeEnum( 2, f ); } f = message.getRoomtype(); if (f !== 0) { writer.writeInt32( 3, f ); } f = message.getUser(); if (f != null) { writer.writeMessage( 4, f, user_pb.GameUser.serializeBinaryToWriter ); } f = message.getColorinfo(); if (f != null) { writer.writeMessage( 20, f, proto.pb.RspMatchRoom.ColorInfo.serializeBinaryToWriter ); } }; 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.pb.RspMatchRoom.ColorInfo.prototype.toObject = function(opt_includeInstance) { return proto.pb.RspMatchRoom.ColorInfo.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.RspMatchRoom.ColorInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.pb.RspMatchRoom.ColorInfo.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.RspMatchRoom.ColorInfo} */ proto.pb.RspMatchRoom.ColorInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.pb.RspMatchRoom.ColorInfo; return proto.pb.RspMatchRoom.ColorInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.pb.RspMatchRoom.ColorInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.pb.RspMatchRoom.ColorInfo} */ proto.pb.RspMatchRoom.ColorInfo.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.RspMatchRoom.ColorInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.pb.RspMatchRoom.ColorInfo.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.RspMatchRoom.ColorInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.pb.RspMatchRoom.ColorInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; }; /** * optional ErrCode code = 1; * @return {!proto.pb.ErrCode} */ proto.pb.RspMatchRoom.prototype.getCode = function() { return /** @type {!proto.pb.ErrCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.pb.ErrCode} value * @return {!proto.pb.RspMatchRoom} returns this */ proto.pb.RspMatchRoom.prototype.setCode = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; /** * optional ServiceTypeId gameId = 2; * @return {!proto.pb.ServiceTypeId} */ proto.pb.RspMatchRoom.prototype.getGameid = function() { return /** @type {!proto.pb.ServiceTypeId} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** * @param {!proto.pb.ServiceTypeId} value * @return {!proto.pb.RspMatchRoom} returns this */ proto.pb.RspMatchRoom.prototype.setGameid = function(value) { return jspb.Message.setProto3EnumField(this, 2, value); }; /** * optional int32 roomType = 3; * @return {number} */ proto.pb.RspMatchRoom.prototype.getRoomtype = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value * @return {!proto.pb.RspMatchRoom} returns this */ proto.pb.RspMatchRoom.prototype.setRoomtype = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; /** * optional GameUser User = 4; * @return {?proto.pb.GameUser} */ proto.pb.RspMatchRoom.prototype.getUser = function() { return /** @type{?proto.pb.GameUser} */ ( jspb.Message.getWrapperField(this, user_pb.GameUser, 4)); }; /** * @param {?proto.pb.GameUser|undefined} value * @return {!proto.pb.RspMatchRoom} returns this */ proto.pb.RspMatchRoom.prototype.setUser = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; /** * Clears the message field making it undefined. * @return {!proto.pb.RspMatchRoom} returns this */ proto.pb.RspMatchRoom.prototype.clearUser = function() { return this.setUser(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.pb.RspMatchRoom.prototype.hasUser = function() { return jspb.Message.getField(this, 4) != null; }; /** * optional ColorInfo colorInfo = 20; * @return {?proto.pb.RspMatchRoom.ColorInfo} */ proto.pb.RspMatchRoom.prototype.getColorinfo = function() { return /** @type{?proto.pb.RspMatchRoom.ColorInfo} */ ( jspb.Message.getWrapperField(this, proto.pb.RspMatchRoom.ColorInfo, 20)); }; /** * @param {?proto.pb.RspMatchRoom.ColorInfo|undefined} value * @return {!proto.pb.RspMatchRoom} returns this */ proto.pb.RspMatchRoom.prototype.setColorinfo = function(value) { return jspb.Message.setWrapperField(this, 20, value); }; /** * Clears the message field making it undefined. * @return {!proto.pb.RspMatchRoom} returns this */ proto.pb.RspMatchRoom.prototype.clearColorinfo = function() { return this.setColorinfo(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ proto.pb.RspMatchRoom.prototype.hasColorinfo = function() { return jspb.Message.getField(this, 20) != null; }; /** * List of repeated fields within this message type. * @private {!Array} * @const */ proto.pb.NotifyUserEnterRoom.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.pb.NotifyUserEnterRoom.prototype.toObject = function(opt_includeInstance) { return proto.pb.NotifyUserEnterRoom.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.NotifyUserEnterRoom} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.pb.NotifyUserEnterRoom.toObject = function(includeInstance, msg) { var f, obj = { userList: jspb.Message.toObjectList(msg.getUserList(), user_pb.GameUser.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.pb.NotifyUserEnterRoom} */ proto.pb.NotifyUserEnterRoom.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.pb.NotifyUserEnterRoom; return proto.pb.NotifyUserEnterRoom.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. * @param {!proto.pb.NotifyUserEnterRoom} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.pb.NotifyUserEnterRoom} */ proto.pb.NotifyUserEnterRoom.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { case 1: var value = new user_pb.GameUser; reader.readMessage(value,user_pb.GameUser.deserializeBinaryFromReader); msg.addUser(value); break; default: reader.skipField(); break; } } return msg; }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ proto.pb.NotifyUserEnterRoom.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.pb.NotifyUserEnterRoom.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.NotifyUserEnterRoom} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ proto.pb.NotifyUserEnterRoom.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUserList(); if (f.length > 0) { writer.writeRepeatedMessage( 1, f, user_pb.GameUser.serializeBinaryToWriter ); } }; /** * repeated GameUser User = 1; * @return {!Array} */ proto.pb.NotifyUserEnterRoom.prototype.getUserList = function() { return /** @type{!Array} */ ( jspb.Message.getRepeatedWrapperField(this, user_pb.GameUser, 1)); }; /** * @param {!Array} value * @return {!proto.pb.NotifyUserEnterRoom} returns this */ proto.pb.NotifyUserEnterRoom.prototype.setUserList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** * @param {!proto.pb.GameUser=} opt_value * @param {number=} opt_index * @return {!proto.pb.GameUser} */ proto.pb.NotifyUserEnterRoom.prototype.addUser = function(opt_value, opt_index) { return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pb.GameUser, opt_index); }; /** * Clears the list making it empty but non-null. * @return {!proto.pb.NotifyUserEnterRoom} returns this */ proto.pb.NotifyUserEnterRoom.prototype.clearUserList = function() { return this.setUserList([]); }; goog.object.extend(exports, proto.pb);