diff --git a/README.md b/README.md index 82abb71..e5b2808 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ # gameClient -cocos creator游戏客户端 \ No newline at end of file +1. 基础框架搭建 + + 1. 编写 ws client。(已完成) + 2. 安装 npm install -g protobufjs protoc-gen-js。生成 pb 文件。(已完成) + 3. 编写 mvc。(已完成) + +2. 登陆界面 + 1. 连接网关并实现登陆功能。 diff --git a/assets/scenes/main.scene b/assets/scenes/main.scene index 62b0095..497d114 100644 --- a/assets/scenes/main.scene +++ b/assets/scenes/main.scene @@ -22,7 +22,9 @@ ], "_active": true, "_components": [], - "_prefab": null, + "_prefab": { + "__id__": 20 + }, "_lpos": { "__type__": "cc.Vec3", "x": 0, @@ -52,7 +54,7 @@ }, "autoReleaseAssets": false, "_globals": { - "__id__": 11 + "__id__": 21 }, "_id": "b4d997b6-dfae-4f49-bd9a-7758657287ae" }, @@ -70,18 +72,21 @@ }, { "__id__": 5 + }, + { + "__id__": 9 } ], "_active": true, "_components": [ { - "__id__": 8 + "__id__": 17 }, { - "__id__": 9 + "__id__": 18 }, { - "__id__": 10 + "__id__": 19 } ], "_prefab": null, @@ -173,7 +178,7 @@ "_priority": 0, "_fov": 45, "_fovAxis": 0, - "_orthoHeight": 414.53807106598987, + "_orthoHeight": 414.11764705882354, "_near": 0, "_far": 2000, "_color": { @@ -207,7 +212,7 @@ }, { "__type__": "cc.Node", - "_name": "LoginPanel", + "_name": "Main", "_objFlags": 0, "__editorExtras__": {}, "_parent": { @@ -221,6 +226,9 @@ }, { "__id__": 7 + }, + { + "__id__": 8 } ], "_prefab": null, @@ -305,6 +313,129 @@ "_lockFlags": 0, "_id": "58VGFS6qRA0oDNxuq2ABP2" }, + { + "__type__": "02ed1mmDNZJCrAihoIx1Jj0", + "_name": "", + "_objFlags": 0, + "__editorExtras__": {}, + "node": { + "__id__": 5 + }, + "_enabled": true, + "__prefab": null, + "_id": "8d9sONKzhJ6bdtIIJExUg4" + }, + { + "__type__": "cc.Node", + "_objFlags": 0, + "_parent": { + "__id__": 2 + }, + "_prefab": { + "__id__": 10 + }, + "__editorExtras__": {} + }, + { + "__type__": "cc.PrefabInfo", + "root": { + "__id__": 9 + }, + "asset": { + "__uuid__": "417a8e17-5fd9-4110-83f0-a9cec338a488", + "__expectedType__": "cc.Prefab" + }, + "fileId": "66x4Ed7QFL34F7BxBDRZWj", + "instance": { + "__id__": 11 + }, + "targetOverrides": null, + "nestedPrefabInstanceRoots": null + }, + { + "__type__": "cc.PrefabInstance", + "fileId": "428UDAffxLUanF2DBHHdRL", + "prefabRootNode": null, + "mountedChildren": [], + "mountedComponents": [], + "propertyOverrides": [ + { + "__id__": 12 + }, + { + "__id__": 14 + }, + { + "__id__": 15 + }, + { + "__id__": 16 + } + ], + "removedComponents": [] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 13 + }, + "propertyPath": [ + "_name" + ], + "value": "LoginPanel" + }, + { + "__type__": "cc.TargetInfo", + "localID": [ + "66x4Ed7QFL34F7BxBDRZWj" + ] + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 13 + }, + "propertyPath": [ + "_lpos" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 13 + }, + "propertyPath": [ + "_lrot" + ], + "value": { + "__type__": "cc.Quat", + "x": 0, + "y": 0, + "z": 0, + "w": 1 + } + }, + { + "__type__": "CCPropertyOverrideInfo", + "targetInfo": { + "__id__": 13 + }, + "propertyPath": [ + "_euler" + ], + "value": { + "__type__": "cc.Vec3", + "x": 0, + "y": 0, + "z": 0 + } + }, { "__type__": "cc.UITransform", "_name": "", @@ -373,31 +504,44 @@ "_lockFlags": 0, "_id": "c5V1EV8IpMtrIvY1OE9t2u" }, + { + "__type__": "cc.PrefabInfo", + "root": null, + "asset": null, + "fileId": "b4d997b6-dfae-4f49-bd9a-7758657287ae", + "instance": null, + "targetOverrides": null, + "nestedPrefabInstanceRoots": [ + { + "__id__": 9 + } + ] + }, { "__type__": "cc.SceneGlobals", "ambient": { - "__id__": 12 + "__id__": 22 }, "shadows": { - "__id__": 13 + "__id__": 23 }, "_skybox": { - "__id__": 14 + "__id__": 24 }, "fog": { - "__id__": 15 + "__id__": 25 }, "octree": { - "__id__": 16 + "__id__": 26 }, "skin": { - "__id__": 17 + "__id__": 27 }, "lightProbeInfo": { - "__id__": 18 + "__id__": 28 }, "postSettings": { - "__id__": 19 + "__id__": 29 }, "bakedWithStationaryMainLight": false, "bakedWithHighpLightmap": false diff --git a/assets/scripts/gamePanel.ts b/assets/scripts/gamePanel.ts index 62490a4..c703648 100644 --- a/assets/scripts/gamePanel.ts +++ b/assets/scripts/gamePanel.ts @@ -1,5 +1,5 @@ import { _decorator, Button, Component, EditBox, Label } from 'cc' -import { WsClient } from './wsclient' +import { WsClient } from './network/wsclient' const { ccclass, property } = _decorator @ccclass('gamePanel') @@ -39,11 +39,7 @@ export class gamePanel extends Component { } start() { - this.sendButton.node.on( - Button.EventType.CLICK, - this.onSendButtonClick, - this - ) + this.sendButton.node.on(Button.EventType.CLICK, this.onSendButtonClick, this) window.addEventListener(`ws-message`, this.onMessage.bind(this)) } diff --git a/assets/scripts/loginPanel.ts b/assets/scripts/login/loginPanel.ts similarity index 91% rename from assets/scripts/loginPanel.ts rename to assets/scripts/login/loginPanel.ts index e211a15..81e150e 100644 --- a/assets/scripts/loginPanel.ts +++ b/assets/scripts/login/loginPanel.ts @@ -1,5 +1,5 @@ import { _decorator, Button, Component, EditBox, Label, Node } from 'cc' -import { WsClient } from './wsclient' +import { WsClient } from '../network/wsclient' const { ccclass, property } = _decorator @ccclass('loginPanel') @@ -13,11 +13,7 @@ export class loginPanel extends Component { // 组件初始化完成后调用 start() { - this.loginButton.node.on( - Button.EventType.CLICK, - this.onLoginButtonClick, - this - ) + this.loginButton.node.on(Button.EventType.CLICK, this.onLoginButtonClick, this) // 监听websocket消息事件 window.addEventListener('ws-message', this.onMessage.bind(this)) } diff --git a/assets/scripts/network/gene_proto.sh b/assets/scripts/network/gene_proto.sh new file mode 100644 index 0000000..85487d8 --- /dev/null +++ b/assets/scripts/network/gene_proto.sh @@ -0,0 +1,10 @@ +#!/bin/bash + + + +protoc \ +--proto_path=C:/workspace/go/game/common/pb/ \ +--js_out=import_style=commonjs,binary:./pb \ +C:/workspace/go/game/common/pb/*.proto + +echo "success" diff --git a/assets/scripts/network/pb/chat_pb.js b/assets/scripts/network/pb/chat_pb.js new file mode 100644 index 0000000..e0b5445 --- /dev/null +++ b/assets/scripts/network/pb/chat_pb.js @@ -0,0 +1,353 @@ +// source: chat.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 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.ChatType', null, global); +goog.exportSymbol('proto.pb.ReqChat', 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.ReqChat = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ReqChat, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ReqChat.displayName = 'proto.pb.ReqChat'; +} + + + +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.ReqChat.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ReqChat.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.ReqChat} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ReqChat.toObject = function(includeInstance, msg) { + var f, obj = { +srcuser: (f = msg.getSrcuser()) && user_pb.ChatUser.toObject(includeInstance, f), +dstuser: (f = msg.getDstuser()) && user_pb.ChatUser.toObject(includeInstance, f), +type: jspb.Message.getFieldWithDefault(msg, 3, 0), +gameid: jspb.Message.getFieldWithDefault(msg, 4, 0), +content: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + 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.ReqChat} + */ +proto.pb.ReqChat.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ReqChat; + return proto.pb.ReqChat.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ReqChat} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ReqChat} + */ +proto.pb.ReqChat.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new user_pb.ChatUser; + reader.readMessage(value,user_pb.ChatUser.deserializeBinaryFromReader); + msg.setSrcuser(value); + break; + case 2: + var value = new user_pb.ChatUser; + reader.readMessage(value,user_pb.ChatUser.deserializeBinaryFromReader); + msg.setDstuser(value); + break; + case 3: + var value = /** @type {!proto.pb.ChatType} */ (reader.readEnum()); + msg.setType(value); + break; + case 4: + var value = /** @type {!proto.pb.ServiceTypeId} */ (reader.readEnum()); + msg.setGameid(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setContent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ReqChat.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ReqChat.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.ReqChat} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ReqChat.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSrcuser(); + if (f != null) { + writer.writeMessage( + 1, + f, + user_pb.ChatUser.serializeBinaryToWriter + ); + } + f = message.getDstuser(); + if (f != null) { + writer.writeMessage( + 2, + f, + user_pb.ChatUser.serializeBinaryToWriter + ); + } + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getGameid(); + if (f !== 0.0) { + writer.writeEnum( + 4, + f + ); + } + f = message.getContent(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional ChatUser srcUser = 1; + * @return {?proto.pb.ChatUser} + */ +proto.pb.ReqChat.prototype.getSrcuser = function() { + return /** @type{?proto.pb.ChatUser} */ ( + jspb.Message.getWrapperField(this, user_pb.ChatUser, 1)); +}; + + +/** + * @param {?proto.pb.ChatUser|undefined} value + * @return {!proto.pb.ReqChat} returns this +*/ +proto.pb.ReqChat.prototype.setSrcuser = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ReqChat} returns this + */ +proto.pb.ReqChat.prototype.clearSrcuser = function() { + return this.setSrcuser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ReqChat.prototype.hasSrcuser = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional ChatUser dstUser = 2; + * @return {?proto.pb.ChatUser} + */ +proto.pb.ReqChat.prototype.getDstuser = function() { + return /** @type{?proto.pb.ChatUser} */ ( + jspb.Message.getWrapperField(this, user_pb.ChatUser, 2)); +}; + + +/** + * @param {?proto.pb.ChatUser|undefined} value + * @return {!proto.pb.ReqChat} returns this +*/ +proto.pb.ReqChat.prototype.setDstuser = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ReqChat} returns this + */ +proto.pb.ReqChat.prototype.clearDstuser = function() { + return this.setDstuser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ReqChat.prototype.hasDstuser = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional ChatType type = 3; + * @return {!proto.pb.ChatType} + */ +proto.pb.ReqChat.prototype.getType = function() { + return /** @type {!proto.pb.ChatType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.pb.ChatType} value + * @return {!proto.pb.ReqChat} returns this + */ +proto.pb.ReqChat.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional ServiceTypeId gameId = 4; + * @return {!proto.pb.ServiceTypeId} + */ +proto.pb.ReqChat.prototype.getGameid = function() { + return /** @type {!proto.pb.ServiceTypeId} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {!proto.pb.ServiceTypeId} value + * @return {!proto.pb.ReqChat} returns this + */ +proto.pb.ReqChat.prototype.setGameid = function(value) { + return jspb.Message.setProto3EnumField(this, 4, value); +}; + + +/** + * optional string content = 5; + * @return {string} + */ +proto.pb.ReqChat.prototype.getContent = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ReqChat} returns this + */ +proto.pb.ReqChat.prototype.setContent = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * @enum {number} + */ +proto.pb.ChatType = { + CT_UNKNOWN: 0, + CT_PRIVATE: 1, + CT_WORLD: 2, + CT_MARQUEE: 3 +}; + +goog.object.extend(exports, proto.pb); diff --git a/assets/scripts/network/pb/client_pb.js b/assets/scripts/network/pb/client_pb.js new file mode 100644 index 0000000..494ebae --- /dev/null +++ b/assets/scripts/network/pb/client_pb.js @@ -0,0 +1,322 @@ +// source: client.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 service_pb = require('./service_pb.js'); +goog.object.extend(proto, service_pb); +goog.exportSymbol('proto.pb.ClientMsg', 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.ClientMsg = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ClientMsg, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ClientMsg.displayName = 'proto.pb.ClientMsg'; +} + + + +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.ClientMsg.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ClientMsg.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.ClientMsg} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ClientMsg.toObject = function(includeInstance, msg) { + var f, obj = { +serviceTid: jspb.Message.getFieldWithDefault(msg, 1, 0), +serviceName: jspb.Message.getFieldWithDefault(msg, 2, ""), +userId: jspb.Message.getFieldWithDefault(msg, 3, 0), +msgId: jspb.Message.getFieldWithDefault(msg, 4, 0), +data: msg.getData_asB64() + }; + + 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.ClientMsg} + */ +proto.pb.ClientMsg.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ClientMsg; + return proto.pb.ClientMsg.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ClientMsg} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ClientMsg} + */ +proto.pb.ClientMsg.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.setServiceTid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setServiceName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUserId(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMsgId(value); + break; + case 5: + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setData(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ClientMsg.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ClientMsg.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.ClientMsg} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ClientMsg.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getServiceTid(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getServiceName(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getUserId(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getMsgId(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getData_asU8(); + if (f.length > 0) { + writer.writeBytes( + 5, + f + ); + } +}; + + +/** + * optional ServiceTypeId service_tid = 1; + * @return {!proto.pb.ServiceTypeId} + */ +proto.pb.ClientMsg.prototype.getServiceTid = function() { + return /** @type {!proto.pb.ServiceTypeId} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ServiceTypeId} value + * @return {!proto.pb.ClientMsg} returns this + */ +proto.pb.ClientMsg.prototype.setServiceTid = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string service_name = 2; + * @return {string} + */ +proto.pb.ClientMsg.prototype.getServiceName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ClientMsg} returns this + */ +proto.pb.ClientMsg.prototype.setServiceName = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 user_id = 3; + * @return {number} + */ +proto.pb.ClientMsg.prototype.getUserId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ClientMsg} returns this + */ +proto.pb.ClientMsg.prototype.setUserId = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 msg_id = 4; + * @return {number} + */ +proto.pb.ClientMsg.prototype.getMsgId = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ClientMsg} returns this + */ +proto.pb.ClientMsg.prototype.setMsgId = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional bytes data = 5; + * @return {!(string|Uint8Array)} + */ +proto.pb.ClientMsg.prototype.getData = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * optional bytes data = 5; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.pb.ClientMsg.prototype.getData_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getData())); +}; + + +/** + * optional bytes data = 5; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getData()` + * @return {!Uint8Array} + */ +proto.pb.ClientMsg.prototype.getData_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getData())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.pb.ClientMsg} returns this + */ +proto.pb.ClientMsg.prototype.setData = function(value) { + return jspb.Message.setProto3BytesField(this, 5, value); +}; + + +goog.object.extend(exports, proto.pb); diff --git a/assets/scripts/network/pb/code_pb.js b/assets/scripts/network/pb/code_pb.js new file mode 100644 index 0000000..8b8bbe3 --- /dev/null +++ b/assets/scripts/network/pb/code_pb.js @@ -0,0 +1,46 @@ +// source: code.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')(); + +goog.exportSymbol('proto.pb.ErrCode', null, global); +/** + * @enum {number} + */ +proto.pb.ErrCode = { + OK: 0, + SYSTEMERR: 1, + PARAMERR: 2, + LOGINDIFFLOC: 100, + LOGINUSERORPWDERR: 102, + ACCOUNTFROZEN: 103, + ACCOUNTBANNED: 104, + REGISTERUSEREXIST: 110, + VERSIONTOOLOW: 115, + MAINTAIN: 120, + GOLDNOTENOUGH: 125, + NOTBETCOUNT: 126, + NOTLEAVEROOM: 127, + TOTALBETEXCEEDSLIMIT: 500, + AREABETEXCEEDSLIMIT: 505 +}; + +goog.object.extend(exports, proto.pb); diff --git a/assets/scripts/network/pb/colorgame_pb.js b/assets/scripts/network/pb/colorgame_pb.js new file mode 100644 index 0000000..f8d4dcf --- /dev/null +++ b/assets/scripts/network/pb/colorgame_pb.js @@ -0,0 +1,6099 @@ +// source: colorgame.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.ColorBetArea', null, global); +goog.exportSymbol('proto.pb.ColorBetAreaInfo', null, global); +goog.exportSymbol('proto.pb.ColorBetAreaMul', null, global); +goog.exportSymbol('proto.pb.ColorBigUser', null, global); +goog.exportSymbol('proto.pb.ColorGameStatus', null, global); +goog.exportSymbol('proto.pb.ColorPrizeArea', null, global); +goog.exportSymbol('proto.pb.ColorPrizeAreaRange', null, global); +goog.exportSymbol('proto.pb.ColorPrizeType', null, global); +goog.exportSymbol('proto.pb.ColorRoomBetting', null, global); +goog.exportSymbol('proto.pb.ColorRoomConfig', null, global); +goog.exportSymbol('proto.pb.ColorRoomEndBet', null, global); +goog.exportSymbol('proto.pb.ColorRoomOpenThreeDice', null, global); +goog.exportSymbol('proto.pb.ColorRoomSettle', null, global); +goog.exportSymbol('proto.pb.ColorRoomStart', null, global); +goog.exportSymbol('proto.pb.ColorRoomWaitStart', null, global); +goog.exportSymbol('proto.pb.ColorType', null, global); +goog.exportSymbol('proto.pb.ColorUser', null, global); +goog.exportSymbol('proto.pb.NtfColorBetAreaInfo', null, global); +goog.exportSymbol('proto.pb.NtfColorBetting', null, global); +goog.exportSymbol('proto.pb.NtfColorBigUser', null, global); +goog.exportSymbol('proto.pb.NtfColorEndBetting', null, global); +goog.exportSymbol('proto.pb.NtfColorGameStart', null, global); +goog.exportSymbol('proto.pb.NtfColorMaintain', null, global); +goog.exportSymbol('proto.pb.NtfColorOpenThreeDice', null, global); +goog.exportSymbol('proto.pb.NtfColorRoomInfo', null, global); +goog.exportSymbol('proto.pb.NtfColorSettle', null, global); +goog.exportSymbol('proto.pb.NtfColorSettle.UserBetAreaMul', null, global); +goog.exportSymbol('proto.pb.NtfColorTrend', null, global); +goog.exportSymbol('proto.pb.NtfColorTrend.ColorRate', null, global); +goog.exportSymbol('proto.pb.ReqColorBetting', null, global); +goog.exportSymbol('proto.pb.RspColorBetting', 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.ColorPrizeAreaRange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorPrizeAreaRange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorPrizeAreaRange.displayName = 'proto.pb.ColorPrizeAreaRange'; +} +/** + * 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.ColorRoomConfig = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.ColorRoomConfig.repeatedFields_, null); +}; +goog.inherits(proto.pb.ColorRoomConfig, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorRoomConfig.displayName = 'proto.pb.ColorRoomConfig'; +} +/** + * 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.ColorRoomWaitStart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorRoomWaitStart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorRoomWaitStart.displayName = 'proto.pb.ColorRoomWaitStart'; +} +/** + * 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.ColorRoomStart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorRoomStart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorRoomStart.displayName = 'proto.pb.ColorRoomStart'; +} +/** + * 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.ColorRoomBetting = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorRoomBetting, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorRoomBetting.displayName = 'proto.pb.ColorRoomBetting'; +} +/** + * 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.ColorRoomEndBet = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorRoomEndBet, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorRoomEndBet.displayName = 'proto.pb.ColorRoomEndBet'; +} +/** + * 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.ColorRoomOpenThreeDice = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorRoomOpenThreeDice, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorRoomOpenThreeDice.displayName = 'proto.pb.ColorRoomOpenThreeDice'; +} +/** + * 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.ColorRoomSettle = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorRoomSettle, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorRoomSettle.displayName = 'proto.pb.ColorRoomSettle'; +} +/** + * 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.NtfColorRoomInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.NtfColorRoomInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorRoomInfo.displayName = 'proto.pb.NtfColorRoomInfo'; +} +/** + * 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.NtfColorGameStart = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.NtfColorGameStart, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorGameStart.displayName = 'proto.pb.NtfColorGameStart'; +} +/** + * 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.NtfColorBetting = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.NtfColorBetting, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorBetting.displayName = 'proto.pb.NtfColorBetting'; +} +/** + * 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.ReqColorBetting = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ReqColorBetting, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ReqColorBetting.displayName = 'proto.pb.ReqColorBetting'; +} +/** + * 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.RspColorBetting = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.RspColorBetting, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.RspColorBetting.displayName = 'proto.pb.RspColorBetting'; +} +/** + * 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.ColorBetAreaInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorBetAreaInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorBetAreaInfo.displayName = 'proto.pb.ColorBetAreaInfo'; +} +/** + * 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.NtfColorBetAreaInfo = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.NtfColorBetAreaInfo.repeatedFields_, null); +}; +goog.inherits(proto.pb.NtfColorBetAreaInfo, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorBetAreaInfo.displayName = 'proto.pb.NtfColorBetAreaInfo'; +} +/** + * 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.ColorBetAreaMul = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorBetAreaMul, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorBetAreaMul.displayName = 'proto.pb.ColorBetAreaMul'; +} +/** + * 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.NtfColorEndBetting = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.NtfColorEndBetting.repeatedFields_, null); +}; +goog.inherits(proto.pb.NtfColorEndBetting, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorEndBetting.displayName = 'proto.pb.NtfColorEndBetting'; +} +/** + * 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.NtfColorOpenThreeDice = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.NtfColorOpenThreeDice.repeatedFields_, null); +}; +goog.inherits(proto.pb.NtfColorOpenThreeDice, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorOpenThreeDice.displayName = 'proto.pb.NtfColorOpenThreeDice'; +} +/** + * 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.NtfColorSettle = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.NtfColorSettle.repeatedFields_, null); +}; +goog.inherits(proto.pb.NtfColorSettle, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorSettle.displayName = 'proto.pb.NtfColorSettle'; +} +/** + * 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.NtfColorSettle.UserBetAreaMul = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.NtfColorSettle.UserBetAreaMul, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorSettle.UserBetAreaMul.displayName = 'proto.pb.NtfColorSettle.UserBetAreaMul'; +} +/** + * 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.ColorUser = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ColorUser, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorUser.displayName = 'proto.pb.ColorUser'; +} +/** + * 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.NtfColorBigUser = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.NtfColorBigUser.repeatedFields_, null); +}; +goog.inherits(proto.pb.NtfColorBigUser, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorBigUser.displayName = 'proto.pb.NtfColorBigUser'; +} +/** + * 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.NtfColorTrend = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.NtfColorTrend.repeatedFields_, null); +}; +goog.inherits(proto.pb.NtfColorTrend, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorTrend.displayName = 'proto.pb.NtfColorTrend'; +} +/** + * 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.NtfColorTrend.ColorRate = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.NtfColorTrend.ColorRate, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorTrend.ColorRate.displayName = 'proto.pb.NtfColorTrend.ColorRate'; +} +/** + * 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.ColorBigUser = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.pb.ColorBigUser.repeatedFields_, null); +}; +goog.inherits(proto.pb.ColorBigUser, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ColorBigUser.displayName = 'proto.pb.ColorBigUser'; +} +/** + * 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.NtfColorMaintain = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.NtfColorMaintain, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfColorMaintain.displayName = 'proto.pb.NtfColorMaintain'; +} + + + +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.ColorPrizeAreaRange.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorPrizeAreaRange.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.ColorPrizeAreaRange} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorPrizeAreaRange.toObject = function(includeInstance, msg) { + var f, obj = { +pos: jspb.Message.getFieldWithDefault(msg, 1, 0), +minmul: jspb.Message.getFieldWithDefault(msg, 2, 0), +maxmul: 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.pb.ColorPrizeAreaRange} + */ +proto.pb.ColorPrizeAreaRange.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorPrizeAreaRange; + return proto.pb.ColorPrizeAreaRange.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorPrizeAreaRange} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorPrizeAreaRange} + */ +proto.pb.ColorPrizeAreaRange.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.pb.ColorPrizeArea} */ (reader.readEnum()); + msg.setPos(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMinmul(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxmul(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorPrizeAreaRange.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorPrizeAreaRange.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.ColorPrizeAreaRange} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorPrizeAreaRange.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getPos(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMinmul(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getMaxmul(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional ColorPrizeArea pos = 1; + * @return {!proto.pb.ColorPrizeArea} + */ +proto.pb.ColorPrizeAreaRange.prototype.getPos = function() { + return /** @type {!proto.pb.ColorPrizeArea} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ColorPrizeArea} value + * @return {!proto.pb.ColorPrizeAreaRange} returns this + */ +proto.pb.ColorPrizeAreaRange.prototype.setPos = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int64 minMul = 2; + * @return {number} + */ +proto.pb.ColorPrizeAreaRange.prototype.getMinmul = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorPrizeAreaRange} returns this + */ +proto.pb.ColorPrizeAreaRange.prototype.setMinmul = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 maxMul = 3; + * @return {number} + */ +proto.pb.ColorPrizeAreaRange.prototype.getMaxmul = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorPrizeAreaRange} returns this + */ +proto.pb.ColorPrizeAreaRange.prototype.setMaxmul = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pb.ColorRoomConfig.repeatedFields_ = [3,5]; + + + +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.ColorRoomConfig.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorRoomConfig.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.ColorRoomConfig} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomConfig.toObject = function(includeInstance, msg) { + var f, obj = { +betlistList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f, +mulrangeconfigList: jspb.Message.toObjectList(msg.getMulrangeconfigList(), + proto.pb.ColorPrizeAreaRange.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.ColorRoomConfig} + */ +proto.pb.ColorRoomConfig.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorRoomConfig; + return proto.pb.ColorRoomConfig.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorRoomConfig} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorRoomConfig} + */ +proto.pb.ColorRoomConfig.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addBetlist(values[i]); + } + break; + case 5: + var value = new proto.pb.ColorPrizeAreaRange; + reader.readMessage(value,proto.pb.ColorPrizeAreaRange.deserializeBinaryFromReader); + msg.addMulrangeconfig(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorRoomConfig.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorRoomConfig.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.ColorRoomConfig} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomConfig.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBetlistList(); + if (f.length > 0) { + writer.writePackedInt64( + 3, + f + ); + } + f = message.getMulrangeconfigList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 5, + f, + proto.pb.ColorPrizeAreaRange.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated int64 betList = 3; + * @return {!Array} + */ +proto.pb.ColorRoomConfig.prototype.getBetlistList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.ColorRoomConfig} returns this + */ +proto.pb.ColorRoomConfig.prototype.setBetlistList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.pb.ColorRoomConfig} returns this + */ +proto.pb.ColorRoomConfig.prototype.addBetlist = 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.ColorRoomConfig} returns this + */ +proto.pb.ColorRoomConfig.prototype.clearBetlistList = function() { + return this.setBetlistList([]); +}; + + +/** + * repeated ColorPrizeAreaRange mulRangeConfig = 5; + * @return {!Array} + */ +proto.pb.ColorRoomConfig.prototype.getMulrangeconfigList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pb.ColorPrizeAreaRange, 5)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.ColorRoomConfig} returns this +*/ +proto.pb.ColorRoomConfig.prototype.setMulrangeconfigList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 5, value); +}; + + +/** + * @param {!proto.pb.ColorPrizeAreaRange=} opt_value + * @param {number=} opt_index + * @return {!proto.pb.ColorPrizeAreaRange} + */ +proto.pb.ColorRoomConfig.prototype.addMulrangeconfig = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.pb.ColorPrizeAreaRange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pb.ColorRoomConfig} returns this + */ +proto.pb.ColorRoomConfig.prototype.clearMulrangeconfigList = function() { + return this.setMulrangeconfigList([]); +}; + + + + + +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.ColorRoomWaitStart.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorRoomWaitStart.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.ColorRoomWaitStart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomWaitStart.toObject = function(includeInstance, msg) { + var f, obj = { +trends: (f = msg.getTrends()) && proto.pb.NtfColorTrend.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.ColorRoomWaitStart} + */ +proto.pb.ColorRoomWaitStart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorRoomWaitStart; + return proto.pb.ColorRoomWaitStart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorRoomWaitStart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorRoomWaitStart} + */ +proto.pb.ColorRoomWaitStart.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.NtfColorTrend; + reader.readMessage(value,proto.pb.NtfColorTrend.deserializeBinaryFromReader); + msg.setTrends(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorRoomWaitStart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorRoomWaitStart.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.ColorRoomWaitStart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomWaitStart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTrends(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pb.NtfColorTrend.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NtfColorTrend Trends = 1; + * @return {?proto.pb.NtfColorTrend} + */ +proto.pb.ColorRoomWaitStart.prototype.getTrends = function() { + return /** @type{?proto.pb.NtfColorTrend} */ ( + jspb.Message.getWrapperField(this, proto.pb.NtfColorTrend, 1)); +}; + + +/** + * @param {?proto.pb.NtfColorTrend|undefined} value + * @return {!proto.pb.ColorRoomWaitStart} returns this +*/ +proto.pb.ColorRoomWaitStart.prototype.setTrends = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ColorRoomWaitStart} returns this + */ +proto.pb.ColorRoomWaitStart.prototype.clearTrends = function() { + return this.setTrends(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ColorRoomWaitStart.prototype.hasTrends = 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.pb.ColorRoomStart.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorRoomStart.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.ColorRoomStart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomStart.toObject = function(includeInstance, msg) { + var f, obj = { +start: (f = msg.getStart()) && proto.pb.NtfColorGameStart.toObject(includeInstance, f), +trends: (f = msg.getTrends()) && proto.pb.NtfColorTrend.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.ColorRoomStart} + */ +proto.pb.ColorRoomStart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorRoomStart; + return proto.pb.ColorRoomStart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorRoomStart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorRoomStart} + */ +proto.pb.ColorRoomStart.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.NtfColorGameStart; + reader.readMessage(value,proto.pb.NtfColorGameStart.deserializeBinaryFromReader); + msg.setStart(value); + break; + case 2: + var value = new proto.pb.NtfColorTrend; + reader.readMessage(value,proto.pb.NtfColorTrend.deserializeBinaryFromReader); + msg.setTrends(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorRoomStart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorRoomStart.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.ColorRoomStart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomStart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStart(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pb.NtfColorGameStart.serializeBinaryToWriter + ); + } + f = message.getTrends(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.pb.NtfColorTrend.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NtfColorGameStart start = 1; + * @return {?proto.pb.NtfColorGameStart} + */ +proto.pb.ColorRoomStart.prototype.getStart = function() { + return /** @type{?proto.pb.NtfColorGameStart} */ ( + jspb.Message.getWrapperField(this, proto.pb.NtfColorGameStart, 1)); +}; + + +/** + * @param {?proto.pb.NtfColorGameStart|undefined} value + * @return {!proto.pb.ColorRoomStart} returns this +*/ +proto.pb.ColorRoomStart.prototype.setStart = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ColorRoomStart} returns this + */ +proto.pb.ColorRoomStart.prototype.clearStart = function() { + return this.setStart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ColorRoomStart.prototype.hasStart = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional NtfColorTrend Trends = 2; + * @return {?proto.pb.NtfColorTrend} + */ +proto.pb.ColorRoomStart.prototype.getTrends = function() { + return /** @type{?proto.pb.NtfColorTrend} */ ( + jspb.Message.getWrapperField(this, proto.pb.NtfColorTrend, 2)); +}; + + +/** + * @param {?proto.pb.NtfColorTrend|undefined} value + * @return {!proto.pb.ColorRoomStart} returns this +*/ +proto.pb.ColorRoomStart.prototype.setTrends = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ColorRoomStart} returns this + */ +proto.pb.ColorRoomStart.prototype.clearTrends = function() { + return this.setTrends(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ColorRoomStart.prototype.hasTrends = function() { + return jspb.Message.getField(this, 2) != 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.pb.ColorRoomBetting.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorRoomBetting.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.ColorRoomBetting} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomBetting.toObject = function(includeInstance, msg) { + var f, obj = { +betareainfo: (f = msg.getBetareainfo()) && proto.pb.NtfColorBetAreaInfo.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.ColorRoomBetting} + */ +proto.pb.ColorRoomBetting.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorRoomBetting; + return proto.pb.ColorRoomBetting.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorRoomBetting} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorRoomBetting} + */ +proto.pb.ColorRoomBetting.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.NtfColorBetAreaInfo; + reader.readMessage(value,proto.pb.NtfColorBetAreaInfo.deserializeBinaryFromReader); + msg.setBetareainfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorRoomBetting.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorRoomBetting.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.ColorRoomBetting} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomBetting.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBetareainfo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pb.NtfColorBetAreaInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NtfColorBetAreaInfo betAreaInfo = 1; + * @return {?proto.pb.NtfColorBetAreaInfo} + */ +proto.pb.ColorRoomBetting.prototype.getBetareainfo = function() { + return /** @type{?proto.pb.NtfColorBetAreaInfo} */ ( + jspb.Message.getWrapperField(this, proto.pb.NtfColorBetAreaInfo, 1)); +}; + + +/** + * @param {?proto.pb.NtfColorBetAreaInfo|undefined} value + * @return {!proto.pb.ColorRoomBetting} returns this +*/ +proto.pb.ColorRoomBetting.prototype.setBetareainfo = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ColorRoomBetting} returns this + */ +proto.pb.ColorRoomBetting.prototype.clearBetareainfo = function() { + return this.setBetareainfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ColorRoomBetting.prototype.hasBetareainfo = 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.pb.ColorRoomEndBet.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorRoomEndBet.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.ColorRoomEndBet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomEndBet.toObject = function(includeInstance, msg) { + var f, obj = { +areamul: (f = msg.getAreamul()) && proto.pb.NtfColorEndBetting.toObject(includeInstance, f), +betareainfo: (f = msg.getBetareainfo()) && proto.pb.NtfColorBetAreaInfo.toObject(includeInstance, f), +biguser: (f = msg.getBiguser()) && proto.pb.NtfColorBigUser.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.ColorRoomEndBet} + */ +proto.pb.ColorRoomEndBet.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorRoomEndBet; + return proto.pb.ColorRoomEndBet.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorRoomEndBet} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorRoomEndBet} + */ +proto.pb.ColorRoomEndBet.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.NtfColorEndBetting; + reader.readMessage(value,proto.pb.NtfColorEndBetting.deserializeBinaryFromReader); + msg.setAreamul(value); + break; + case 2: + var value = new proto.pb.NtfColorBetAreaInfo; + reader.readMessage(value,proto.pb.NtfColorBetAreaInfo.deserializeBinaryFromReader); + msg.setBetareainfo(value); + break; + case 3: + var value = new proto.pb.NtfColorBigUser; + reader.readMessage(value,proto.pb.NtfColorBigUser.deserializeBinaryFromReader); + msg.setBiguser(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorRoomEndBet.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorRoomEndBet.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.ColorRoomEndBet} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomEndBet.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAreamul(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pb.NtfColorEndBetting.serializeBinaryToWriter + ); + } + f = message.getBetareainfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.pb.NtfColorBetAreaInfo.serializeBinaryToWriter + ); + } + f = message.getBiguser(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.pb.NtfColorBigUser.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NtfColorEndBetting areaMul = 1; + * @return {?proto.pb.NtfColorEndBetting} + */ +proto.pb.ColorRoomEndBet.prototype.getAreamul = function() { + return /** @type{?proto.pb.NtfColorEndBetting} */ ( + jspb.Message.getWrapperField(this, proto.pb.NtfColorEndBetting, 1)); +}; + + +/** + * @param {?proto.pb.NtfColorEndBetting|undefined} value + * @return {!proto.pb.ColorRoomEndBet} returns this +*/ +proto.pb.ColorRoomEndBet.prototype.setAreamul = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ColorRoomEndBet} returns this + */ +proto.pb.ColorRoomEndBet.prototype.clearAreamul = function() { + return this.setAreamul(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ColorRoomEndBet.prototype.hasAreamul = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional NtfColorBetAreaInfo betAreaInfo = 2; + * @return {?proto.pb.NtfColorBetAreaInfo} + */ +proto.pb.ColorRoomEndBet.prototype.getBetareainfo = function() { + return /** @type{?proto.pb.NtfColorBetAreaInfo} */ ( + jspb.Message.getWrapperField(this, proto.pb.NtfColorBetAreaInfo, 2)); +}; + + +/** + * @param {?proto.pb.NtfColorBetAreaInfo|undefined} value + * @return {!proto.pb.ColorRoomEndBet} returns this +*/ +proto.pb.ColorRoomEndBet.prototype.setBetareainfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ColorRoomEndBet} returns this + */ +proto.pb.ColorRoomEndBet.prototype.clearBetareainfo = function() { + return this.setBetareainfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ColorRoomEndBet.prototype.hasBetareainfo = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional NtfColorBigUser bigUser = 3; + * @return {?proto.pb.NtfColorBigUser} + */ +proto.pb.ColorRoomEndBet.prototype.getBiguser = function() { + return /** @type{?proto.pb.NtfColorBigUser} */ ( + jspb.Message.getWrapperField(this, proto.pb.NtfColorBigUser, 3)); +}; + + +/** + * @param {?proto.pb.NtfColorBigUser|undefined} value + * @return {!proto.pb.ColorRoomEndBet} returns this +*/ +proto.pb.ColorRoomEndBet.prototype.setBiguser = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ColorRoomEndBet} returns this + */ +proto.pb.ColorRoomEndBet.prototype.clearBiguser = function() { + return this.setBiguser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ColorRoomEndBet.prototype.hasBiguser = 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.pb.ColorRoomOpenThreeDice.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorRoomOpenThreeDice.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.ColorRoomOpenThreeDice} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomOpenThreeDice.toObject = function(includeInstance, msg) { + var f, obj = { +dices: (f = msg.getDices()) && proto.pb.NtfColorOpenThreeDice.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.ColorRoomOpenThreeDice} + */ +proto.pb.ColorRoomOpenThreeDice.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorRoomOpenThreeDice; + return proto.pb.ColorRoomOpenThreeDice.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorRoomOpenThreeDice} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorRoomOpenThreeDice} + */ +proto.pb.ColorRoomOpenThreeDice.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.NtfColorOpenThreeDice; + reader.readMessage(value,proto.pb.NtfColorOpenThreeDice.deserializeBinaryFromReader); + msg.setDices(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorRoomOpenThreeDice.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorRoomOpenThreeDice.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.ColorRoomOpenThreeDice} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomOpenThreeDice.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getDices(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pb.NtfColorOpenThreeDice.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NtfColorOpenThreeDice dices = 1; + * @return {?proto.pb.NtfColorOpenThreeDice} + */ +proto.pb.ColorRoomOpenThreeDice.prototype.getDices = function() { + return /** @type{?proto.pb.NtfColorOpenThreeDice} */ ( + jspb.Message.getWrapperField(this, proto.pb.NtfColorOpenThreeDice, 1)); +}; + + +/** + * @param {?proto.pb.NtfColorOpenThreeDice|undefined} value + * @return {!proto.pb.ColorRoomOpenThreeDice} returns this +*/ +proto.pb.ColorRoomOpenThreeDice.prototype.setDices = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ColorRoomOpenThreeDice} returns this + */ +proto.pb.ColorRoomOpenThreeDice.prototype.clearDices = function() { + return this.setDices(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ColorRoomOpenThreeDice.prototype.hasDices = 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.pb.ColorRoomSettle.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorRoomSettle.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.ColorRoomSettle} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomSettle.toObject = function(includeInstance, msg) { + var f, obj = { +settle: (f = msg.getSettle()) && proto.pb.NtfColorSettle.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.ColorRoomSettle} + */ +proto.pb.ColorRoomSettle.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorRoomSettle; + return proto.pb.ColorRoomSettle.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorRoomSettle} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorRoomSettle} + */ +proto.pb.ColorRoomSettle.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.NtfColorSettle; + reader.readMessage(value,proto.pb.NtfColorSettle.deserializeBinaryFromReader); + msg.setSettle(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorRoomSettle.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorRoomSettle.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.ColorRoomSettle} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorRoomSettle.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSettle(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pb.NtfColorSettle.serializeBinaryToWriter + ); + } +}; + + +/** + * optional NtfColorSettle settle = 1; + * @return {?proto.pb.NtfColorSettle} + */ +proto.pb.ColorRoomSettle.prototype.getSettle = function() { + return /** @type{?proto.pb.NtfColorSettle} */ ( + jspb.Message.getWrapperField(this, proto.pb.NtfColorSettle, 1)); +}; + + +/** + * @param {?proto.pb.NtfColorSettle|undefined} value + * @return {!proto.pb.ColorRoomSettle} returns this +*/ +proto.pb.ColorRoomSettle.prototype.setSettle = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.ColorRoomSettle} returns this + */ +proto.pb.ColorRoomSettle.prototype.clearSettle = function() { + return this.setSettle(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.ColorRoomSettle.prototype.hasSettle = 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.pb.NtfColorRoomInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorRoomInfo.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.NtfColorRoomInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorRoomInfo.toObject = function(includeInstance, msg) { + var f, obj = { +status: jspb.Message.getFieldWithDefault(msg, 1, 0), +endtime: jspb.Message.getFieldWithDefault(msg, 2, 0), +config: (f = msg.getConfig()) && proto.pb.ColorRoomConfig.toObject(includeInstance, f), +user: (f = msg.getUser()) && proto.pb.ColorUser.toObject(includeInstance, f), +waitstart: (f = msg.getWaitstart()) && proto.pb.ColorRoomWaitStart.toObject(includeInstance, f), +start: (f = msg.getStart()) && proto.pb.ColorRoomStart.toObject(includeInstance, f), +betting: (f = msg.getBetting()) && proto.pb.ColorRoomBetting.toObject(includeInstance, f), +endbet: (f = msg.getEndbet()) && proto.pb.ColorRoomEndBet.toObject(includeInstance, f), +openthreedice: (f = msg.getOpenthreedice()) && proto.pb.ColorRoomOpenThreeDice.toObject(includeInstance, f), +settle: (f = msg.getSettle()) && proto.pb.ColorRoomSettle.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.NtfColorRoomInfo} + */ +proto.pb.NtfColorRoomInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorRoomInfo; + return proto.pb.NtfColorRoomInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorRoomInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorRoomInfo} + */ +proto.pb.NtfColorRoomInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.pb.ColorGameStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndtime(value); + break; + case 101: + var value = new proto.pb.ColorRoomConfig; + reader.readMessage(value,proto.pb.ColorRoomConfig.deserializeBinaryFromReader); + msg.setConfig(value); + break; + case 100: + var value = new proto.pb.ColorUser; + reader.readMessage(value,proto.pb.ColorUser.deserializeBinaryFromReader); + msg.setUser(value); + break; + case 3: + var value = new proto.pb.ColorRoomWaitStart; + reader.readMessage(value,proto.pb.ColorRoomWaitStart.deserializeBinaryFromReader); + msg.setWaitstart(value); + break; + case 4: + var value = new proto.pb.ColorRoomStart; + reader.readMessage(value,proto.pb.ColorRoomStart.deserializeBinaryFromReader); + msg.setStart(value); + break; + case 5: + var value = new proto.pb.ColorRoomBetting; + reader.readMessage(value,proto.pb.ColorRoomBetting.deserializeBinaryFromReader); + msg.setBetting(value); + break; + case 6: + var value = new proto.pb.ColorRoomEndBet; + reader.readMessage(value,proto.pb.ColorRoomEndBet.deserializeBinaryFromReader); + msg.setEndbet(value); + break; + case 7: + var value = new proto.pb.ColorRoomOpenThreeDice; + reader.readMessage(value,proto.pb.ColorRoomOpenThreeDice.deserializeBinaryFromReader); + msg.setOpenthreedice(value); + break; + case 8: + var value = new proto.pb.ColorRoomSettle; + reader.readMessage(value,proto.pb.ColorRoomSettle.deserializeBinaryFromReader); + msg.setSettle(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorRoomInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorRoomInfo.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.NtfColorRoomInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorRoomInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getEndtime(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getConfig(); + if (f != null) { + writer.writeMessage( + 101, + f, + proto.pb.ColorRoomConfig.serializeBinaryToWriter + ); + } + f = message.getUser(); + if (f != null) { + writer.writeMessage( + 100, + f, + proto.pb.ColorUser.serializeBinaryToWriter + ); + } + f = message.getWaitstart(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.pb.ColorRoomWaitStart.serializeBinaryToWriter + ); + } + f = message.getStart(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.pb.ColorRoomStart.serializeBinaryToWriter + ); + } + f = message.getBetting(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.pb.ColorRoomBetting.serializeBinaryToWriter + ); + } + f = message.getEndbet(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.pb.ColorRoomEndBet.serializeBinaryToWriter + ); + } + f = message.getOpenthreedice(); + if (f != null) { + writer.writeMessage( + 7, + f, + proto.pb.ColorRoomOpenThreeDice.serializeBinaryToWriter + ); + } + f = message.getSettle(); + if (f != null) { + writer.writeMessage( + 8, + f, + proto.pb.ColorRoomSettle.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ColorGameStatus status = 1; + * @return {!proto.pb.ColorGameStatus} + */ +proto.pb.NtfColorRoomInfo.prototype.getStatus = function() { + return /** @type {!proto.pb.ColorGameStatus} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ColorGameStatus} value + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int64 endTime = 2; + * @return {number} + */ +proto.pb.NtfColorRoomInfo.prototype.getEndtime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.setEndtime = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional ColorRoomConfig config = 101; + * @return {?proto.pb.ColorRoomConfig} + */ +proto.pb.NtfColorRoomInfo.prototype.getConfig = function() { + return /** @type{?proto.pb.ColorRoomConfig} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorRoomConfig, 101)); +}; + + +/** + * @param {?proto.pb.ColorRoomConfig|undefined} value + * @return {!proto.pb.NtfColorRoomInfo} returns this +*/ +proto.pb.NtfColorRoomInfo.prototype.setConfig = function(value) { + return jspb.Message.setWrapperField(this, 101, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.clearConfig = function() { + return this.setConfig(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.NtfColorRoomInfo.prototype.hasConfig = function() { + return jspb.Message.getField(this, 101) != null; +}; + + +/** + * optional ColorUser user = 100; + * @return {?proto.pb.ColorUser} + */ +proto.pb.NtfColorRoomInfo.prototype.getUser = function() { + return /** @type{?proto.pb.ColorUser} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorUser, 100)); +}; + + +/** + * @param {?proto.pb.ColorUser|undefined} value + * @return {!proto.pb.NtfColorRoomInfo} returns this +*/ +proto.pb.NtfColorRoomInfo.prototype.setUser = function(value) { + return jspb.Message.setWrapperField(this, 100, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.clearUser = function() { + return this.setUser(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.NtfColorRoomInfo.prototype.hasUser = function() { + return jspb.Message.getField(this, 100) != null; +}; + + +/** + * optional ColorRoomWaitStart waitStart = 3; + * @return {?proto.pb.ColorRoomWaitStart} + */ +proto.pb.NtfColorRoomInfo.prototype.getWaitstart = function() { + return /** @type{?proto.pb.ColorRoomWaitStart} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorRoomWaitStart, 3)); +}; + + +/** + * @param {?proto.pb.ColorRoomWaitStart|undefined} value + * @return {!proto.pb.NtfColorRoomInfo} returns this +*/ +proto.pb.NtfColorRoomInfo.prototype.setWaitstart = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.clearWaitstart = function() { + return this.setWaitstart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.NtfColorRoomInfo.prototype.hasWaitstart = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional ColorRoomStart start = 4; + * @return {?proto.pb.ColorRoomStart} + */ +proto.pb.NtfColorRoomInfo.prototype.getStart = function() { + return /** @type{?proto.pb.ColorRoomStart} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorRoomStart, 4)); +}; + + +/** + * @param {?proto.pb.ColorRoomStart|undefined} value + * @return {!proto.pb.NtfColorRoomInfo} returns this +*/ +proto.pb.NtfColorRoomInfo.prototype.setStart = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.clearStart = function() { + return this.setStart(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.NtfColorRoomInfo.prototype.hasStart = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional ColorRoomBetting betting = 5; + * @return {?proto.pb.ColorRoomBetting} + */ +proto.pb.NtfColorRoomInfo.prototype.getBetting = function() { + return /** @type{?proto.pb.ColorRoomBetting} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorRoomBetting, 5)); +}; + + +/** + * @param {?proto.pb.ColorRoomBetting|undefined} value + * @return {!proto.pb.NtfColorRoomInfo} returns this +*/ +proto.pb.NtfColorRoomInfo.prototype.setBetting = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.clearBetting = function() { + return this.setBetting(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.NtfColorRoomInfo.prototype.hasBetting = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional ColorRoomEndBet endBet = 6; + * @return {?proto.pb.ColorRoomEndBet} + */ +proto.pb.NtfColorRoomInfo.prototype.getEndbet = function() { + return /** @type{?proto.pb.ColorRoomEndBet} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorRoomEndBet, 6)); +}; + + +/** + * @param {?proto.pb.ColorRoomEndBet|undefined} value + * @return {!proto.pb.NtfColorRoomInfo} returns this +*/ +proto.pb.NtfColorRoomInfo.prototype.setEndbet = function(value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.clearEndbet = function() { + return this.setEndbet(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.NtfColorRoomInfo.prototype.hasEndbet = function() { + return jspb.Message.getField(this, 6) != null; +}; + + +/** + * optional ColorRoomOpenThreeDice openThreeDice = 7; + * @return {?proto.pb.ColorRoomOpenThreeDice} + */ +proto.pb.NtfColorRoomInfo.prototype.getOpenthreedice = function() { + return /** @type{?proto.pb.ColorRoomOpenThreeDice} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorRoomOpenThreeDice, 7)); +}; + + +/** + * @param {?proto.pb.ColorRoomOpenThreeDice|undefined} value + * @return {!proto.pb.NtfColorRoomInfo} returns this +*/ +proto.pb.NtfColorRoomInfo.prototype.setOpenthreedice = function(value) { + return jspb.Message.setWrapperField(this, 7, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.clearOpenthreedice = function() { + return this.setOpenthreedice(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.NtfColorRoomInfo.prototype.hasOpenthreedice = function() { + return jspb.Message.getField(this, 7) != null; +}; + + +/** + * optional ColorRoomSettle settle = 8; + * @return {?proto.pb.ColorRoomSettle} + */ +proto.pb.NtfColorRoomInfo.prototype.getSettle = function() { + return /** @type{?proto.pb.ColorRoomSettle} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorRoomSettle, 8)); +}; + + +/** + * @param {?proto.pb.ColorRoomSettle|undefined} value + * @return {!proto.pb.NtfColorRoomInfo} returns this +*/ +proto.pb.NtfColorRoomInfo.prototype.setSettle = function(value) { + return jspb.Message.setWrapperField(this, 8, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.NtfColorRoomInfo} returns this + */ +proto.pb.NtfColorRoomInfo.prototype.clearSettle = function() { + return this.setSettle(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.NtfColorRoomInfo.prototype.hasSettle = function() { + return jspb.Message.getField(this, 8) != 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.pb.NtfColorGameStart.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorGameStart.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.NtfColorGameStart} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorGameStart.toObject = function(includeInstance, msg) { + var f, obj = { +endtime: jspb.Message.getFieldWithDefault(msg, 1, 0), +jackpot: 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.NtfColorGameStart} + */ +proto.pb.NtfColorGameStart.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorGameStart; + return proto.pb.NtfColorGameStart.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorGameStart} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorGameStart} + */ +proto.pb.NtfColorGameStart.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndtime(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setJackpot(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorGameStart.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorGameStart.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.NtfColorGameStart} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorGameStart.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEndtime(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getJackpot(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional int64 endTime = 1; + * @return {number} + */ +proto.pb.NtfColorGameStart.prototype.getEndtime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorGameStart} returns this + */ +proto.pb.NtfColorGameStart.prototype.setEndtime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional int64 jackpot = 2; + * @return {number} + */ +proto.pb.NtfColorGameStart.prototype.getJackpot = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorGameStart} returns this + */ +proto.pb.NtfColorGameStart.prototype.setJackpot = 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.NtfColorBetting.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorBetting.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.NtfColorBetting} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorBetting.toObject = function(includeInstance, msg) { + var f, obj = { +endtime: 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.NtfColorBetting} + */ +proto.pb.NtfColorBetting.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorBetting; + return proto.pb.NtfColorBetting.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorBetting} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorBetting} + */ +proto.pb.NtfColorBetting.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndtime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorBetting.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorBetting.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.NtfColorBetting} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorBetting.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEndtime(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 endTime = 1; + * @return {number} + */ +proto.pb.NtfColorBetting.prototype.getEndtime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorBetting} returns this + */ +proto.pb.NtfColorBetting.prototype.setEndtime = 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.pb.ReqColorBetting.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ReqColorBetting.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.ReqColorBetting} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ReqColorBetting.toObject = function(includeInstance, msg) { + var f, obj = { +area: jspb.Message.getFieldWithDefault(msg, 1, 0), +bet: 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.ReqColorBetting} + */ +proto.pb.ReqColorBetting.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ReqColorBetting; + return proto.pb.ReqColorBetting.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ReqColorBetting} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ReqColorBetting} + */ +proto.pb.ReqColorBetting.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.pb.ColorBetArea} */ (reader.readEnum()); + msg.setArea(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ReqColorBetting.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ReqColorBetting.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.ReqColorBetting} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ReqColorBetting.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getArea(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getBet(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } +}; + + +/** + * optional ColorBetArea area = 1; + * @return {!proto.pb.ColorBetArea} + */ +proto.pb.ReqColorBetting.prototype.getArea = function() { + return /** @type {!proto.pb.ColorBetArea} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ColorBetArea} value + * @return {!proto.pb.ReqColorBetting} returns this + */ +proto.pb.ReqColorBetting.prototype.setArea = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int64 bet = 2; + * @return {number} + */ +proto.pb.ReqColorBetting.prototype.getBet = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ReqColorBetting} returns this + */ +proto.pb.ReqColorBetting.prototype.setBet = 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.RspColorBetting.prototype.toObject = function(opt_includeInstance) { + return proto.pb.RspColorBetting.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.RspColorBetting} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.RspColorBetting.toObject = function(includeInstance, msg) { + var f, obj = { +code: jspb.Message.getFieldWithDefault(msg, 1, 0), +areainfo: (f = msg.getAreainfo()) && proto.pb.ColorBetAreaInfo.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.RspColorBetting} + */ +proto.pb.RspColorBetting.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.RspColorBetting; + return proto.pb.RspColorBetting.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.RspColorBetting} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.RspColorBetting} + */ +proto.pb.RspColorBetting.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 = new proto.pb.ColorBetAreaInfo; + reader.readMessage(value,proto.pb.ColorBetAreaInfo.deserializeBinaryFromReader); + msg.setAreainfo(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.RspColorBetting.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.RspColorBetting.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.RspColorBetting} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.RspColorBetting.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getAreainfo(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.pb.ColorBetAreaInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ErrCode code = 1; + * @return {!proto.pb.ErrCode} + */ +proto.pb.RspColorBetting.prototype.getCode = function() { + return /** @type {!proto.pb.ErrCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ErrCode} value + * @return {!proto.pb.RspColorBetting} returns this + */ +proto.pb.RspColorBetting.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional ColorBetAreaInfo areaInfo = 2; + * @return {?proto.pb.ColorBetAreaInfo} + */ +proto.pb.RspColorBetting.prototype.getAreainfo = function() { + return /** @type{?proto.pb.ColorBetAreaInfo} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorBetAreaInfo, 2)); +}; + + +/** + * @param {?proto.pb.ColorBetAreaInfo|undefined} value + * @return {!proto.pb.RspColorBetting} returns this +*/ +proto.pb.RspColorBetting.prototype.setAreainfo = function(value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.RspColorBetting} returns this + */ +proto.pb.RspColorBetting.prototype.clearAreainfo = function() { + return this.setAreainfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.RspColorBetting.prototype.hasAreainfo = function() { + return jspb.Message.getField(this, 2) != 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.pb.ColorBetAreaInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorBetAreaInfo.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.ColorBetAreaInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorBetAreaInfo.toObject = function(includeInstance, msg) { + var f, obj = { +area: jspb.Message.getFieldWithDefault(msg, 1, 0), +totalbet: jspb.Message.getFieldWithDefault(msg, 2, 0), +playernum: jspb.Message.getFieldWithDefault(msg, 3, 0), +mybet: jspb.Message.getFieldWithDefault(msg, 4, 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.ColorBetAreaInfo} + */ +proto.pb.ColorBetAreaInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorBetAreaInfo; + return proto.pb.ColorBetAreaInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorBetAreaInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorBetAreaInfo} + */ +proto.pb.ColorBetAreaInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.pb.ColorBetArea} */ (reader.readEnum()); + msg.setArea(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalbet(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPlayernum(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMybet(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorBetAreaInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorBetAreaInfo.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.ColorBetAreaInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorBetAreaInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getArea(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getTotalbet(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getPlayernum(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getMybet(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional ColorBetArea area = 1; + * @return {!proto.pb.ColorBetArea} + */ +proto.pb.ColorBetAreaInfo.prototype.getArea = function() { + return /** @type {!proto.pb.ColorBetArea} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ColorBetArea} value + * @return {!proto.pb.ColorBetAreaInfo} returns this + */ +proto.pb.ColorBetAreaInfo.prototype.setArea = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int64 totalBet = 2; + * @return {number} + */ +proto.pb.ColorBetAreaInfo.prototype.getTotalbet = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorBetAreaInfo} returns this + */ +proto.pb.ColorBetAreaInfo.prototype.setTotalbet = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 playerNum = 3; + * @return {number} + */ +proto.pb.ColorBetAreaInfo.prototype.getPlayernum = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorBetAreaInfo} returns this + */ +proto.pb.ColorBetAreaInfo.prototype.setPlayernum = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 myBet = 4; + * @return {number} + */ +proto.pb.ColorBetAreaInfo.prototype.getMybet = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorBetAreaInfo} returns this + */ +proto.pb.ColorBetAreaInfo.prototype.setMybet = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pb.NtfColorBetAreaInfo.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.NtfColorBetAreaInfo.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorBetAreaInfo.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.NtfColorBetAreaInfo} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorBetAreaInfo.toObject = function(includeInstance, msg) { + var f, obj = { +areainfosList: jspb.Message.toObjectList(msg.getAreainfosList(), + proto.pb.ColorBetAreaInfo.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.NtfColorBetAreaInfo} + */ +proto.pb.NtfColorBetAreaInfo.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorBetAreaInfo; + return proto.pb.NtfColorBetAreaInfo.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorBetAreaInfo} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorBetAreaInfo} + */ +proto.pb.NtfColorBetAreaInfo.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.ColorBetAreaInfo; + reader.readMessage(value,proto.pb.ColorBetAreaInfo.deserializeBinaryFromReader); + msg.addAreainfos(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorBetAreaInfo.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorBetAreaInfo.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.NtfColorBetAreaInfo} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorBetAreaInfo.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAreainfosList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.pb.ColorBetAreaInfo.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ColorBetAreaInfo areaInfos = 1; + * @return {!Array} + */ +proto.pb.NtfColorBetAreaInfo.prototype.getAreainfosList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pb.ColorBetAreaInfo, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.NtfColorBetAreaInfo} returns this +*/ +proto.pb.NtfColorBetAreaInfo.prototype.setAreainfosList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.pb.ColorBetAreaInfo=} opt_value + * @param {number=} opt_index + * @return {!proto.pb.ColorBetAreaInfo} + */ +proto.pb.NtfColorBetAreaInfo.prototype.addAreainfos = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pb.ColorBetAreaInfo, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pb.NtfColorBetAreaInfo} returns this + */ +proto.pb.NtfColorBetAreaInfo.prototype.clearAreainfosList = function() { + return this.setAreainfosList([]); +}; + + + + + +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.ColorBetAreaMul.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorBetAreaMul.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.ColorBetAreaMul} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorBetAreaMul.toObject = function(includeInstance, msg) { + var f, obj = { +area: jspb.Message.getFieldWithDefault(msg, 1, 0), +prizearea: jspb.Message.getFieldWithDefault(msg, 2, 0), +prizetype: jspb.Message.getFieldWithDefault(msg, 3, 0), +mul: jspb.Message.getFieldWithDefault(msg, 4, 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.ColorBetAreaMul} + */ +proto.pb.ColorBetAreaMul.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorBetAreaMul; + return proto.pb.ColorBetAreaMul.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorBetAreaMul} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorBetAreaMul} + */ +proto.pb.ColorBetAreaMul.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.pb.ColorBetArea} */ (reader.readEnum()); + msg.setArea(value); + break; + case 2: + var value = /** @type {!proto.pb.ColorPrizeArea} */ (reader.readEnum()); + msg.setPrizearea(value); + break; + case 3: + var value = /** @type {!proto.pb.ColorPrizeType} */ (reader.readEnum()); + msg.setPrizetype(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMul(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorBetAreaMul.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorBetAreaMul.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.ColorBetAreaMul} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorBetAreaMul.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getArea(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getPrizearea(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getPrizetype(); + if (f !== 0.0) { + writer.writeEnum( + 3, + f + ); + } + f = message.getMul(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional ColorBetArea area = 1; + * @return {!proto.pb.ColorBetArea} + */ +proto.pb.ColorBetAreaMul.prototype.getArea = function() { + return /** @type {!proto.pb.ColorBetArea} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ColorBetArea} value + * @return {!proto.pb.ColorBetAreaMul} returns this + */ +proto.pb.ColorBetAreaMul.prototype.setArea = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional ColorPrizeArea prizeArea = 2; + * @return {!proto.pb.ColorPrizeArea} + */ +proto.pb.ColorBetAreaMul.prototype.getPrizearea = function() { + return /** @type {!proto.pb.ColorPrizeArea} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {!proto.pb.ColorPrizeArea} value + * @return {!proto.pb.ColorBetAreaMul} returns this + */ +proto.pb.ColorBetAreaMul.prototype.setPrizearea = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + + +/** + * optional ColorPrizeType prizeType = 3; + * @return {!proto.pb.ColorPrizeType} + */ +proto.pb.ColorBetAreaMul.prototype.getPrizetype = function() { + return /** @type {!proto.pb.ColorPrizeType} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {!proto.pb.ColorPrizeType} value + * @return {!proto.pb.ColorBetAreaMul} returns this + */ +proto.pb.ColorBetAreaMul.prototype.setPrizetype = function(value) { + return jspb.Message.setProto3EnumField(this, 3, value); +}; + + +/** + * optional int64 mul = 4; + * @return {number} + */ +proto.pb.ColorBetAreaMul.prototype.getMul = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorBetAreaMul} returns this + */ +proto.pb.ColorBetAreaMul.prototype.setMul = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pb.NtfColorEndBetting.repeatedFields_ = [2]; + + + +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.NtfColorEndBetting.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorEndBetting.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.NtfColorEndBetting} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorEndBetting.toObject = function(includeInstance, msg) { + var f, obj = { +endtime: jspb.Message.getFieldWithDefault(msg, 1, 0), +areamulList: jspb.Message.toObjectList(msg.getAreamulList(), + proto.pb.ColorBetAreaMul.toObject, includeInstance), +jackpot: 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.pb.NtfColorEndBetting} + */ +proto.pb.NtfColorEndBetting.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorEndBetting; + return proto.pb.NtfColorEndBetting.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorEndBetting} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorEndBetting} + */ +proto.pb.NtfColorEndBetting.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEndtime(value); + break; + case 2: + var value = new proto.pb.ColorBetAreaMul; + reader.readMessage(value,proto.pb.ColorBetAreaMul.deserializeBinaryFromReader); + msg.addAreamul(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setJackpot(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorEndBetting.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorEndBetting.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.NtfColorEndBetting} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorEndBetting.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEndtime(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getAreamulList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.pb.ColorBetAreaMul.serializeBinaryToWriter + ); + } + f = message.getJackpot(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional int64 endTime = 1; + * @return {number} + */ +proto.pb.NtfColorEndBetting.prototype.getEndtime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorEndBetting} returns this + */ +proto.pb.NtfColorEndBetting.prototype.setEndtime = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated ColorBetAreaMul areaMul = 2; + * @return {!Array} + */ +proto.pb.NtfColorEndBetting.prototype.getAreamulList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pb.ColorBetAreaMul, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.NtfColorEndBetting} returns this +*/ +proto.pb.NtfColorEndBetting.prototype.setAreamulList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.pb.ColorBetAreaMul=} opt_value + * @param {number=} opt_index + * @return {!proto.pb.ColorBetAreaMul} + */ +proto.pb.NtfColorEndBetting.prototype.addAreamul = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.pb.ColorBetAreaMul, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pb.NtfColorEndBetting} returns this + */ +proto.pb.NtfColorEndBetting.prototype.clearAreamulList = function() { + return this.setAreamulList([]); +}; + + +/** + * optional int64 jackpot = 3; + * @return {number} + */ +proto.pb.NtfColorEndBetting.prototype.getJackpot = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorEndBetting} returns this + */ +proto.pb.NtfColorEndBetting.prototype.setJackpot = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pb.NtfColorOpenThreeDice.repeatedFields_ = [1,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.pb.NtfColorOpenThreeDice.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorOpenThreeDice.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.NtfColorOpenThreeDice} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorOpenThreeDice.toObject = function(includeInstance, msg) { + var f, obj = { +colorList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, +anirouteindex: jspb.Message.getFieldWithDefault(msg, 3, 0), +winareaList: (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.pb.NtfColorOpenThreeDice} + */ +proto.pb.NtfColorOpenThreeDice.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorOpenThreeDice; + return proto.pb.NtfColorOpenThreeDice.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorOpenThreeDice} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorOpenThreeDice} + */ +proto.pb.NtfColorOpenThreeDice.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addColor(values[i]); + } + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setAnirouteindex(value); + break; + case 4: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addWinarea(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorOpenThreeDice.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorOpenThreeDice.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.NtfColorOpenThreeDice} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorOpenThreeDice.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getColorList(); + if (f.length > 0) { + writer.writePackedEnum( + 1, + f + ); + } + f = message.getAnirouteindex(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = message.getWinareaList(); + if (f.length > 0) { + writer.writePackedEnum( + 4, + f + ); + } +}; + + +/** + * repeated ColorType color = 1; + * @return {!Array} + */ +proto.pb.NtfColorOpenThreeDice.prototype.getColorList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.NtfColorOpenThreeDice} returns this + */ +proto.pb.NtfColorOpenThreeDice.prototype.setColorList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {!proto.pb.ColorType} value + * @param {number=} opt_index + * @return {!proto.pb.NtfColorOpenThreeDice} returns this + */ +proto.pb.NtfColorOpenThreeDice.prototype.addColor = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pb.NtfColorOpenThreeDice} returns this + */ +proto.pb.NtfColorOpenThreeDice.prototype.clearColorList = function() { + return this.setColorList([]); +}; + + +/** + * optional int32 aniRouteIndex = 3; + * @return {number} + */ +proto.pb.NtfColorOpenThreeDice.prototype.getAnirouteindex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorOpenThreeDice} returns this + */ +proto.pb.NtfColorOpenThreeDice.prototype.setAnirouteindex = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * repeated ColorBetArea winArea = 4; + * @return {!Array} + */ +proto.pb.NtfColorOpenThreeDice.prototype.getWinareaList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.NtfColorOpenThreeDice} returns this + */ +proto.pb.NtfColorOpenThreeDice.prototype.setWinareaList = function(value) { + return jspb.Message.setField(this, 4, value || []); +}; + + +/** + * @param {!proto.pb.ColorBetArea} value + * @param {number=} opt_index + * @return {!proto.pb.NtfColorOpenThreeDice} returns this + */ +proto.pb.NtfColorOpenThreeDice.prototype.addWinarea = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pb.NtfColorOpenThreeDice} returns this + */ +proto.pb.NtfColorOpenThreeDice.prototype.clearWinareaList = function() { + return this.setWinareaList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pb.NtfColorSettle.repeatedFields_ = [1,2]; + + + +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.NtfColorSettle.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorSettle.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.NtfColorSettle} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorSettle.toObject = function(includeInstance, msg) { + var f, obj = { +userareawinList: jspb.Message.toObjectList(msg.getUserareawinList(), + proto.pb.NtfColorSettle.UserBetAreaMul.toObject, includeInstance), +threediceList: (f = jspb.Message.getRepeatedField(msg, 2)) == null ? undefined : f, +totalwin: jspb.Message.getFieldWithDefault(msg, 3, 0), +totalbet: jspb.Message.getFieldWithDefault(msg, 4, 0), +totalwinbasebet: jspb.Message.getFieldWithDefault(msg, 6, 0), +tax: jspb.Message.getFieldWithDefault(msg, 5, 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.NtfColorSettle} + */ +proto.pb.NtfColorSettle.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorSettle; + return proto.pb.NtfColorSettle.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorSettle} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorSettle} + */ +proto.pb.NtfColorSettle.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.NtfColorSettle.UserBetAreaMul; + reader.readMessage(value,proto.pb.NtfColorSettle.UserBetAreaMul.deserializeBinaryFromReader); + msg.addUserareawin(value); + break; + case 2: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedEnum() : [reader.readEnum()]); + for (var i = 0; i < values.length; i++) { + msg.addThreedice(values[i]); + } + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalwin(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalbet(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTotalwinbasebet(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setTax(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorSettle.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorSettle.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.NtfColorSettle} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorSettle.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserareawinList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.pb.NtfColorSettle.UserBetAreaMul.serializeBinaryToWriter + ); + } + f = message.getThreediceList(); + if (f.length > 0) { + writer.writePackedEnum( + 2, + f + ); + } + f = message.getTotalwin(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTotalbet(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getTotalwinbasebet(); + if (f !== 0) { + writer.writeInt64( + 6, + f + ); + } + f = message.getTax(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + + + + +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.NtfColorSettle.UserBetAreaMul.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorSettle.UserBetAreaMul.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.NtfColorSettle.UserBetAreaMul} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorSettle.UserBetAreaMul.toObject = function(includeInstance, msg) { + var f, obj = { +areamul: (f = msg.getAreamul()) && proto.pb.ColorBetAreaMul.toObject(includeInstance, f), +bet: jspb.Message.getFieldWithDefault(msg, 2, 0), +win: jspb.Message.getFieldWithDefault(msg, 3, 0), +realwin: jspb.Message.getFieldWithDefault(msg, 4, 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.NtfColorSettle.UserBetAreaMul} + */ +proto.pb.NtfColorSettle.UserBetAreaMul.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorSettle.UserBetAreaMul; + return proto.pb.NtfColorSettle.UserBetAreaMul.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorSettle.UserBetAreaMul} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorSettle.UserBetAreaMul} + */ +proto.pb.NtfColorSettle.UserBetAreaMul.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.ColorBetAreaMul; + reader.readMessage(value,proto.pb.ColorBetAreaMul.deserializeBinaryFromReader); + msg.setAreamul(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setBet(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setWin(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRealwin(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorSettle.UserBetAreaMul.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.NtfColorSettle.UserBetAreaMul} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorSettle.UserBetAreaMul.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAreamul(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.pb.ColorBetAreaMul.serializeBinaryToWriter + ); + } + f = message.getBet(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getWin(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getRealwin(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } +}; + + +/** + * optional ColorBetAreaMul areaMul = 1; + * @return {?proto.pb.ColorBetAreaMul} + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.getAreamul = function() { + return /** @type{?proto.pb.ColorBetAreaMul} */ ( + jspb.Message.getWrapperField(this, proto.pb.ColorBetAreaMul, 1)); +}; + + +/** + * @param {?proto.pb.ColorBetAreaMul|undefined} value + * @return {!proto.pb.NtfColorSettle.UserBetAreaMul} returns this +*/ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.setAreamul = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.pb.NtfColorSettle.UserBetAreaMul} returns this + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.clearAreamul = function() { + return this.setAreamul(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.hasAreamul = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 bet = 2; + * @return {number} + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.getBet = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorSettle.UserBetAreaMul} returns this + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.setBet = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 win = 3; + * @return {number} + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.getWin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorSettle.UserBetAreaMul} returns this + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.setWin = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 realWin = 4; + * @return {number} + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.getRealwin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorSettle.UserBetAreaMul} returns this + */ +proto.pb.NtfColorSettle.UserBetAreaMul.prototype.setRealwin = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * repeated UserBetAreaMul userAreaWin = 1; + * @return {!Array} + */ +proto.pb.NtfColorSettle.prototype.getUserareawinList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pb.NtfColorSettle.UserBetAreaMul, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.NtfColorSettle} returns this +*/ +proto.pb.NtfColorSettle.prototype.setUserareawinList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.pb.NtfColorSettle.UserBetAreaMul=} opt_value + * @param {number=} opt_index + * @return {!proto.pb.NtfColorSettle.UserBetAreaMul} + */ +proto.pb.NtfColorSettle.prototype.addUserareawin = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pb.NtfColorSettle.UserBetAreaMul, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pb.NtfColorSettle} returns this + */ +proto.pb.NtfColorSettle.prototype.clearUserareawinList = function() { + return this.setUserareawinList([]); +}; + + +/** + * repeated ColorType threeDice = 2; + * @return {!Array} + */ +proto.pb.NtfColorSettle.prototype.getThreediceList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 2)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.NtfColorSettle} returns this + */ +proto.pb.NtfColorSettle.prototype.setThreediceList = function(value) { + return jspb.Message.setField(this, 2, value || []); +}; + + +/** + * @param {!proto.pb.ColorType} value + * @param {number=} opt_index + * @return {!proto.pb.NtfColorSettle} returns this + */ +proto.pb.NtfColorSettle.prototype.addThreedice = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 2, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pb.NtfColorSettle} returns this + */ +proto.pb.NtfColorSettle.prototype.clearThreediceList = function() { + return this.setThreediceList([]); +}; + + +/** + * optional int64 totalWin = 3; + * @return {number} + */ +proto.pb.NtfColorSettle.prototype.getTotalwin = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorSettle} returns this + */ +proto.pb.NtfColorSettle.prototype.setTotalwin = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 totalBet = 4; + * @return {number} + */ +proto.pb.NtfColorSettle.prototype.getTotalbet = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorSettle} returns this + */ +proto.pb.NtfColorSettle.prototype.setTotalbet = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 totalWinBaseBet = 6; + * @return {number} + */ +proto.pb.NtfColorSettle.prototype.getTotalwinbasebet = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorSettle} returns this + */ +proto.pb.NtfColorSettle.prototype.setTotalwinbasebet = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 tax = 5; + * @return {number} + */ +proto.pb.NtfColorSettle.prototype.getTax = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorSettle} returns this + */ +proto.pb.NtfColorSettle.prototype.setTax = function(value) { + return jspb.Message.setProto3IntField(this, 5, 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.ColorUser.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorUser.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.ColorUser} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorUser.toObject = function(includeInstance, msg) { + var f, obj = { +nick: jspb.Message.getFieldWithDefault(msg, 1, ""), +head: jspb.Message.getFieldWithDefault(msg, 2, ""), +score: jspb.Message.getFieldWithDefault(msg, 3, 0), +seatid: jspb.Message.getFieldWithDefault(msg, 4, 0), +userid: jspb.Message.getFieldWithDefault(msg, 5, 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.ColorUser} + */ +proto.pb.ColorUser.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorUser; + return proto.pb.ColorUser.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorUser} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorUser} + */ +proto.pb.ColorUser.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.setNick(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setHead(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setScore(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setSeatid(value); + break; + case 5: + 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.ColorUser.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorUser.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.ColorUser} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorUser.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNick(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getHead(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getScore(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getSeatid(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } + f = message.getUserid(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } +}; + + +/** + * optional string Nick = 1; + * @return {string} + */ +proto.pb.ColorUser.prototype.getNick = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ColorUser} returns this + */ +proto.pb.ColorUser.prototype.setNick = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string Head = 2; + * @return {string} + */ +proto.pb.ColorUser.prototype.getHead = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ColorUser} returns this + */ +proto.pb.ColorUser.prototype.setHead = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 Score = 3; + * @return {number} + */ +proto.pb.ColorUser.prototype.getScore = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorUser} returns this + */ +proto.pb.ColorUser.prototype.setScore = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int32 SeatId = 4; + * @return {number} + */ +proto.pb.ColorUser.prototype.getSeatid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorUser} returns this + */ +proto.pb.ColorUser.prototype.setSeatid = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 UserID = 5; + * @return {number} + */ +proto.pb.ColorUser.prototype.getUserid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorUser} returns this + */ +proto.pb.ColorUser.prototype.setUserid = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pb.NtfColorBigUser.repeatedFields_ = [34]; + + + +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.NtfColorBigUser.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorBigUser.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.NtfColorBigUser} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorBigUser.toObject = function(includeInstance, msg) { + var f, obj = { +biguserList: jspb.Message.toObjectList(msg.getBiguserList(), + proto.pb.ColorBigUser.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.NtfColorBigUser} + */ +proto.pb.NtfColorBigUser.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorBigUser; + return proto.pb.NtfColorBigUser.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorBigUser} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorBigUser} + */ +proto.pb.NtfColorBigUser.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 34: + var value = new proto.pb.ColorBigUser; + reader.readMessage(value,proto.pb.ColorBigUser.deserializeBinaryFromReader); + msg.addBiguser(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorBigUser.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorBigUser.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.NtfColorBigUser} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorBigUser.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBiguserList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 34, + f, + proto.pb.ColorBigUser.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated ColorBigUser bigUser = 34; + * @return {!Array} + */ +proto.pb.NtfColorBigUser.prototype.getBiguserList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pb.ColorBigUser, 34)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.NtfColorBigUser} returns this +*/ +proto.pb.NtfColorBigUser.prototype.setBiguserList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 34, value); +}; + + +/** + * @param {!proto.pb.ColorBigUser=} opt_value + * @param {number=} opt_index + * @return {!proto.pb.ColorBigUser} + */ +proto.pb.NtfColorBigUser.prototype.addBiguser = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 34, opt_value, proto.pb.ColorBigUser, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pb.NtfColorBigUser} returns this + */ +proto.pb.NtfColorBigUser.prototype.clearBiguserList = function() { + return this.setBiguserList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pb.NtfColorTrend.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.NtfColorTrend.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorTrend.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.NtfColorTrend} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorTrend.toObject = function(includeInstance, msg) { + var f, obj = { +colorrateList: jspb.Message.toObjectList(msg.getColorrateList(), + proto.pb.NtfColorTrend.ColorRate.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.NtfColorTrend} + */ +proto.pb.NtfColorTrend.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorTrend; + return proto.pb.NtfColorTrend.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorTrend} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorTrend} + */ +proto.pb.NtfColorTrend.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.pb.NtfColorTrend.ColorRate; + reader.readMessage(value,proto.pb.NtfColorTrend.ColorRate.deserializeBinaryFromReader); + msg.addColorrate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorTrend.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorTrend.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.NtfColorTrend} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorTrend.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getColorrateList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.pb.NtfColorTrend.ColorRate.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.NtfColorTrend.ColorRate.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorTrend.ColorRate.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.NtfColorTrend.ColorRate} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorTrend.ColorRate.toObject = function(includeInstance, msg) { + var f, obj = { +color: jspb.Message.getFieldWithDefault(msg, 1, 0), +rate: 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.NtfColorTrend.ColorRate} + */ +proto.pb.NtfColorTrend.ColorRate.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorTrend.ColorRate; + return proto.pb.NtfColorTrend.ColorRate.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorTrend.ColorRate} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorTrend.ColorRate} + */ +proto.pb.NtfColorTrend.ColorRate.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.pb.ColorType} */ (reader.readEnum()); + msg.setColor(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setRate(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorTrend.ColorRate.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorTrend.ColorRate.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.NtfColorTrend.ColorRate} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorTrend.ColorRate.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getColor(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getRate(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * optional ColorType color = 1; + * @return {!proto.pb.ColorType} + */ +proto.pb.NtfColorTrend.ColorRate.prototype.getColor = function() { + return /** @type {!proto.pb.ColorType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ColorType} value + * @return {!proto.pb.NtfColorTrend.ColorRate} returns this + */ +proto.pb.NtfColorTrend.ColorRate.prototype.setColor = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int32 rate = 2; + * @return {number} + */ +proto.pb.NtfColorTrend.ColorRate.prototype.getRate = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorTrend.ColorRate} returns this + */ +proto.pb.NtfColorTrend.ColorRate.prototype.setRate = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * repeated ColorRate colorRate = 1; + * @return {!Array} + */ +proto.pb.NtfColorTrend.prototype.getColorrateList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.pb.NtfColorTrend.ColorRate, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.NtfColorTrend} returns this +*/ +proto.pb.NtfColorTrend.prototype.setColorrateList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.pb.NtfColorTrend.ColorRate=} opt_value + * @param {number=} opt_index + * @return {!proto.pb.NtfColorTrend.ColorRate} + */ +proto.pb.NtfColorTrend.prototype.addColorrate = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.pb.NtfColorTrend.ColorRate, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.pb.NtfColorTrend} returns this + */ +proto.pb.NtfColorTrend.prototype.clearColorrateList = function() { + return this.setColorrateList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.pb.ColorBigUser.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_, 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.ColorBigUser.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ColorBigUser.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.ColorBigUser} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorBigUser.toObject = function(includeInstance, msg) { + var f, obj = { +nickname: jspb.Message.getFieldWithDefault(msg, 5, ""), +avatar: jspb.Message.getFieldWithDefault(msg, 2, ""), +winchips: jspb.Message.getFieldWithDefault(msg, 1, 0), +areaidList: (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.ColorBigUser} + */ +proto.pb.ColorBigUser.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ColorBigUser; + return proto.pb.ColorBigUser.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ColorBigUser} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ColorBigUser} + */ +proto.pb.ColorBigUser.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setNickname(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAvatar(value); + break; + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setWinchips(value); + break; + case 3: + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addAreaid(values[i]); + } + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ColorBigUser.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ColorBigUser.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.ColorBigUser} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ColorBigUser.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNickname(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getAvatar(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getWinchips(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getAreaidList(); + if (f.length > 0) { + writer.writePackedInt64( + 3, + f + ); + } +}; + + +/** + * optional string nickName = 5; + * @return {string} + */ +proto.pb.ColorBigUser.prototype.getNickname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ColorBigUser} returns this + */ +proto.pb.ColorBigUser.prototype.setNickname = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string avatar = 2; + * @return {string} + */ +proto.pb.ColorBigUser.prototype.getAvatar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ColorBigUser} returns this + */ +proto.pb.ColorBigUser.prototype.setAvatar = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 winChips = 1; + * @return {number} + */ +proto.pb.ColorBigUser.prototype.getWinchips = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ColorBigUser} returns this + */ +proto.pb.ColorBigUser.prototype.setWinchips = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * repeated int64 areaId = 3; + * @return {!Array} + */ +proto.pb.ColorBigUser.prototype.getAreaidList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.pb.ColorBigUser} returns this + */ +proto.pb.ColorBigUser.prototype.setAreaidList = function(value) { + return jspb.Message.setField(this, 3, value || []); +}; + + +/** + * @param {number} value + * @param {number=} opt_index + * @return {!proto.pb.ColorBigUser} returns this + */ +proto.pb.ColorBigUser.prototype.addAreaid = 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.ColorBigUser} returns this + */ +proto.pb.ColorBigUser.prototype.clearAreaidList = function() { + return this.setAreaidList([]); +}; + + + + + +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.NtfColorMaintain.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfColorMaintain.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.NtfColorMaintain} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorMaintain.toObject = function(includeInstance, msg) { + var f, obj = { +msg: jspb.Message.getFieldWithDefault(msg, 2, ""), +gold: 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.pb.NtfColorMaintain} + */ +proto.pb.NtfColorMaintain.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfColorMaintain; + return proto.pb.NtfColorMaintain.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfColorMaintain} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfColorMaintain} + */ +proto.pb.NtfColorMaintain.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMsg(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGold(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.NtfColorMaintain.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfColorMaintain.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.NtfColorMaintain} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfColorMaintain.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getMsg(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getGold(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } +}; + + +/** + * optional string msg = 2; + * @return {string} + */ +proto.pb.NtfColorMaintain.prototype.getMsg = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.NtfColorMaintain} returns this + */ +proto.pb.NtfColorMaintain.prototype.setMsg = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional int64 gold = 3; + * @return {number} + */ +proto.pb.NtfColorMaintain.prototype.getGold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.NtfColorMaintain} returns this + */ +proto.pb.NtfColorMaintain.prototype.setGold = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * @enum {number} + */ +proto.pb.ColorPrizeArea = { + CPA_SINGLE_0: 0, + CPA_SINGLE_1: 1, + CPA_SINGLE_2: 2, + CPA_DOUBLE: 3, + CPA_THREE: 4 +}; + +/** + * @enum {number} + */ +proto.pb.ColorType = { + CT_YELLOW: 0, + CT_WHITE: 1, + CT_PINK: 2, + CT_BLUE: 3, + CT_RED: 4, + CT_GREEN: 5 +}; + +/** + * @enum {number} + */ +proto.pb.ColorBetArea = { + CBA_YELLOW: 0, + CBA_WHITE: 1, + CBA_PINK: 2, + CBA_BLUE: 3, + CBA_RED: 4, + CBA_GREEN: 5, + CBA_YELLOW2: 6, + CBA_WHITE2: 7, + CBA_PINK2: 8, + CBA_BLUE2: 9, + CBA_RED2: 10, + CBA_GREEN2: 11, + CBA_YELLOW3: 12, + CBA_WHITE3: 13, + CBA_PINK3: 14, + CBA_BLUE3: 15, + CBA_RED3: 16, + CBA_GREEN3: 17 +}; + +/** + * @enum {number} + */ +proto.pb.ColorGameStatus = { + CGS_WAITSTART: 0, + CGS_START: 1, + CGS_BETTING: 2, + CGS_BETEND: 3, + CGS_OPENTHREEDICE: 4, + CGS_SETTLE: 5 +}; + +/** + * @enum {number} + */ +proto.pb.ColorPrizeType = { + CPT_NORMAL: 0, + CPT_BIG: 1, + CPT_JACKPOT: 2 +}; + +goog.object.extend(exports, proto.pb); diff --git a/assets/scripts/network/pb/common_pb.js b/assets/scripts/network/pb/common_pb.js new file mode 100644 index 0000000..ddc22b4 --- /dev/null +++ b/assets/scripts/network/pb/common_pb.js @@ -0,0 +1,940 @@ +// source: common.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.NtfKickOutUser', null, global); +goog.exportSymbol('proto.pb.NtfPayoutFail', null, global); +goog.exportSymbol('proto.pb.ReqEnterRoom', null, global); +goog.exportSymbol('proto.pb.ReqLeaveRoom', null, global); +goog.exportSymbol('proto.pb.RspEnterRoom', null, global); +goog.exportSymbol('proto.pb.RspLeaveRoom', 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.NtfKickOutUser = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.NtfKickOutUser, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfKickOutUser.displayName = 'proto.pb.NtfKickOutUser'; +} +/** + * 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.ReqEnterRoom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ReqEnterRoom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ReqEnterRoom.displayName = 'proto.pb.ReqEnterRoom'; +} +/** + * 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.RspEnterRoom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.RspEnterRoom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.RspEnterRoom.displayName = 'proto.pb.RspEnterRoom'; +} +/** + * 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.ReqLeaveRoom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ReqLeaveRoom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ReqLeaveRoom.displayName = 'proto.pb.ReqLeaveRoom'; +} +/** + * 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.RspLeaveRoom = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.RspLeaveRoom, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.RspLeaveRoom.displayName = 'proto.pb.RspLeaveRoom'; +} +/** + * 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.NtfPayoutFail = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.NtfPayoutFail, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.NtfPayoutFail.displayName = 'proto.pb.NtfPayoutFail'; +} + + + +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.NtfKickOutUser.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfKickOutUser.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.NtfKickOutUser} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfKickOutUser.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.NtfKickOutUser} + */ +proto.pb.NtfKickOutUser.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfKickOutUser; + return proto.pb.NtfKickOutUser.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfKickOutUser} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfKickOutUser} + */ +proto.pb.NtfKickOutUser.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.NtfKickOutUser.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfKickOutUser.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.NtfKickOutUser} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfKickOutUser.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.NtfKickOutUser.prototype.getCode = function() { + return /** @type {!proto.pb.ErrCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ErrCode} value + * @return {!proto.pb.NtfKickOutUser} returns this + */ +proto.pb.NtfKickOutUser.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_, 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.ReqEnterRoom.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ReqEnterRoom.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.ReqEnterRoom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ReqEnterRoom.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.ReqEnterRoom} + */ +proto.pb.ReqEnterRoom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ReqEnterRoom; + return proto.pb.ReqEnterRoom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ReqEnterRoom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ReqEnterRoom} + */ +proto.pb.ReqEnterRoom.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.ReqEnterRoom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ReqEnterRoom.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.ReqEnterRoom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ReqEnterRoom.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.pb.RspEnterRoom.prototype.toObject = function(opt_includeInstance) { + return proto.pb.RspEnterRoom.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.RspEnterRoom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.RspEnterRoom.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) + }; + + 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.RspEnterRoom} + */ +proto.pb.RspEnterRoom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.RspEnterRoom; + return proto.pb.RspEnterRoom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.RspEnterRoom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.RspEnterRoom} + */ +proto.pb.RspEnterRoom.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.readInt32()); + msg.setGameid(value); + break; + case 3: + 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.RspEnterRoom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.RspEnterRoom.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.RspEnterRoom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.RspEnterRoom.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getGameid(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = message.getRoomtype(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } +}; + + +/** + * optional ErrCode code = 1; + * @return {!proto.pb.ErrCode} + */ +proto.pb.RspEnterRoom.prototype.getCode = function() { + return /** @type {!proto.pb.ErrCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ErrCode} value + * @return {!proto.pb.RspEnterRoom} returns this + */ +proto.pb.RspEnterRoom.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional int32 gameId = 2; + * @return {number} + */ +proto.pb.RspEnterRoom.prototype.getGameid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.RspEnterRoom} returns this + */ +proto.pb.RspEnterRoom.prototype.setGameid = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int32 roomType = 3; + * @return {number} + */ +proto.pb.RspEnterRoom.prototype.getRoomtype = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.RspEnterRoom} returns this + */ +proto.pb.RspEnterRoom.prototype.setRoomtype = 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.pb.ReqLeaveRoom.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ReqLeaveRoom.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.ReqLeaveRoom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ReqLeaveRoom.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.ReqLeaveRoom} + */ +proto.pb.ReqLeaveRoom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ReqLeaveRoom; + return proto.pb.ReqLeaveRoom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ReqLeaveRoom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ReqLeaveRoom} + */ +proto.pb.ReqLeaveRoom.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.ReqLeaveRoom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ReqLeaveRoom.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.ReqLeaveRoom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ReqLeaveRoom.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.pb.RspLeaveRoom.prototype.toObject = function(opt_includeInstance) { + return proto.pb.RspLeaveRoom.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.RspLeaveRoom} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.RspLeaveRoom.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.RspLeaveRoom} + */ +proto.pb.RspLeaveRoom.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.RspLeaveRoom; + return proto.pb.RspLeaveRoom.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.RspLeaveRoom} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.RspLeaveRoom} + */ +proto.pb.RspLeaveRoom.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.RspLeaveRoom.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.RspLeaveRoom.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.RspLeaveRoom} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.RspLeaveRoom.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.RspLeaveRoom.prototype.getCode = function() { + return /** @type {!proto.pb.ErrCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ErrCode} value + * @return {!proto.pb.RspLeaveRoom} returns this + */ +proto.pb.RspLeaveRoom.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_, 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.NtfPayoutFail.prototype.toObject = function(opt_includeInstance) { + return proto.pb.NtfPayoutFail.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.NtfPayoutFail} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfPayoutFail.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.NtfPayoutFail} + */ +proto.pb.NtfPayoutFail.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.NtfPayoutFail; + return proto.pb.NtfPayoutFail.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.NtfPayoutFail} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.NtfPayoutFail} + */ +proto.pb.NtfPayoutFail.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.NtfPayoutFail.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.NtfPayoutFail.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.NtfPayoutFail} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.NtfPayoutFail.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.NtfPayoutFail.prototype.getCode = function() { + return /** @type {!proto.pb.ErrCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.pb.ErrCode} value + * @return {!proto.pb.NtfPayoutFail} returns this + */ +proto.pb.NtfPayoutFail.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +goog.object.extend(exports, proto.pb); diff --git a/assets/scripts/network/pb/login_pb.js b/assets/scripts/network/pb/login_pb.js new file mode 100644 index 0000000..e5591ff --- /dev/null +++ b/assets/scripts/network/pb/login_pb.js @@ -0,0 +1,1267 @@ +// 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_, 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_, 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_, 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} + * @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_, 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} + */ +proto.pb.NtfUserInService.prototype.getServicenamesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} 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_, 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_, 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_, 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); diff --git a/assets/scripts/network/pb/match_pb.js b/assets/scripts/network/pb/match_pb.js new file mode 100644 index 0000000..72ea4ed --- /dev/null +++ b/assets/scripts/network/pb/match_pb.js @@ -0,0 +1,831 @@ +// 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); diff --git a/assets/scripts/network/pb/msgId_pb.js b/assets/scripts/network/pb/msgId_pb.js new file mode 100644 index 0000000..4100e34 --- /dev/null +++ b/assets/scripts/network/pb/msgId_pb.js @@ -0,0 +1,62 @@ +// source: msgId.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')(); + +goog.exportSymbol('proto.pb.MsgId', null, global); +/** + * @enum {number} + */ +proto.pb.MsgId = { + MI_UNKNOWN: 0, + NTFMAINTAINID: 1000, + NTFKICKOUTUSERID: 1001, + REQENTERROOMID: 1002, + RSPENTERROOMID: 1003, + REQLEAVEROOMID: 1004, + RSPLEAVEROOMID: 1005, + NTFPAYOUTFAILID: 1010, + REQCHATID: 2000, + RSPCHATID: 2001, + REQUSERLOGINID: 2100, + RSPUSERLOGINID: 2101, + NTFUSERONLINEID: 2102, + NTFUSERINSERVICEID: 2103, + REQUSERLOGOUTID: 2104, + RSPUSERLOGOUTID: 2105, + NTFUSEROFFLINEID: 2106, + REQMATCHROOMID: 2200, + RSPMATCHROOMID: 2201, + NTFUSERENTERROOMID: 2202, + NTFCOLORROOMINFOID: 2300, + NTFCOLORGAMESTARTID: 2305, + NTFCOLORBETTINGID: 2310, + REQCOLORBETTINGID: 2315, + RSPCOLORBETTINGID: 2320, + NTFCOLORBETAREAINFOID: 2325, + NTFCOLORENDBETTINGID: 2330, + NTFCOLOROPENTHREEDICEID: 2335, + NTFCOLORSETTLEID: 2340, + NTFCOLORBIGUSERID: 2345, + NTFCOLORTRENDID: 2350 +}; + +goog.object.extend(exports, proto.pb); diff --git a/assets/scripts/network/pb/service_pb.js b/assets/scripts/network/pb/service_pb.js new file mode 100644 index 0000000..be5e32d --- /dev/null +++ b/assets/scripts/network/pb/service_pb.js @@ -0,0 +1,40 @@ +// source: service.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')(); + +goog.exportSymbol('proto.pb.ServiceTypeId', null, global); +/** + * @enum {number} + */ +proto.pb.ServiceTypeId = { + STI_UNKNOWN: 0, + STI_LOGIN: 10000, + STI_CHAT: 10005, + STI_MATCH: 10010, + STI_LOBBY: 10015, + STI_ADMIN: 10020, + STI_GATE: 20000, + STI_COLORGAME: 20005, + STI_DB: 30000 +}; + +goog.object.extend(exports, proto.pb); diff --git a/assets/scripts/network/pb/user_pb.js b/assets/scripts/network/pb/user_pb.js new file mode 100644 index 0000000..8d95056 --- /dev/null +++ b/assets/scripts/network/pb/user_pb.js @@ -0,0 +1,658 @@ +// source: user.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')(); + +goog.exportSymbol('proto.pb.ChatUser', null, global); +goog.exportSymbol('proto.pb.GameUser', 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.ChatUser = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.ChatUser, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.ChatUser.displayName = 'proto.pb.ChatUser'; +} +/** + * 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.GameUser = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.pb.GameUser, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.pb.GameUser.displayName = 'proto.pb.GameUser'; +} + + + +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.ChatUser.prototype.toObject = function(opt_includeInstance) { + return proto.pb.ChatUser.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.ChatUser} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ChatUser.toObject = function(includeInstance, msg) { + var f, obj = { +userid: jspb.Message.getFieldWithDefault(msg, 1, 0), +nickname: jspb.Message.getFieldWithDefault(msg, 2, ""), +avatar: jspb.Message.getFieldWithDefault(msg, 3, ""), +avatarframe: jspb.Message.getFieldWithDefault(msg, 4, ""), +viplevel: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + 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.ChatUser} + */ +proto.pb.ChatUser.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.ChatUser; + return proto.pb.ChatUser.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.ChatUser} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.ChatUser} + */ +proto.pb.ChatUser.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUserid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNickname(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAvatar(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAvatarframe(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setViplevel(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.ChatUser.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.ChatUser.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.ChatUser} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.ChatUser.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserid(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getNickname(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAvatar(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAvatarframe(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getViplevel(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } +}; + + +/** + * optional int64 userId = 1; + * @return {number} + */ +proto.pb.ChatUser.prototype.getUserid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.ChatUser} returns this + */ +proto.pb.ChatUser.prototype.setUserid = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string nickname = 2; + * @return {string} + */ +proto.pb.ChatUser.prototype.getNickname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ChatUser} returns this + */ +proto.pb.ChatUser.prototype.setNickname = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string avatar = 3; + * @return {string} + */ +proto.pb.ChatUser.prototype.getAvatar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ChatUser} returns this + */ +proto.pb.ChatUser.prototype.setAvatar = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string avatarFrame = 4; + * @return {string} + */ +proto.pb.ChatUser.prototype.getAvatarframe = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ChatUser} returns this + */ +proto.pb.ChatUser.prototype.setAvatarframe = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional string vipLevel = 5; + * @return {string} + */ +proto.pb.ChatUser.prototype.getViplevel = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.ChatUser} returns this + */ +proto.pb.ChatUser.prototype.setViplevel = function(value) { + return jspb.Message.setProto3StringField(this, 5, 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.GameUser.prototype.toObject = function(opt_includeInstance) { + return proto.pb.GameUser.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.GameUser} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.GameUser.toObject = function(includeInstance, msg) { + var f, obj = { +userid: jspb.Message.getFieldWithDefault(msg, 1, 0), +nickname: jspb.Message.getFieldWithDefault(msg, 2, ""), +avatar: jspb.Message.getFieldWithDefault(msg, 3, ""), +avatarframe: jspb.Message.getFieldWithDefault(msg, 4, ""), +viplevel: jspb.Message.getFieldWithDefault(msg, 5, 0), +vipexp: jspb.Message.getFieldWithDefault(msg, 6, 0), +seat: jspb.Message.getFieldWithDefault(msg, 20, 0), +gold: jspb.Message.getFieldWithDefault(msg, 25, 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.GameUser} + */ +proto.pb.GameUser.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.pb.GameUser; + return proto.pb.GameUser.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.pb.GameUser} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.pb.GameUser} + */ +proto.pb.GameUser.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUserid(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNickname(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAvatar(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setAvatarframe(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt32()); + msg.setViplevel(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setVipexp(value); + break; + case 20: + var value = /** @type {number} */ (reader.readInt64()); + msg.setSeat(value); + break; + case 25: + var value = /** @type {number} */ (reader.readInt64()); + msg.setGold(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.pb.GameUser.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.pb.GameUser.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.GameUser} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.pb.GameUser.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getUserid(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getNickname(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAvatar(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getAvatarframe(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getViplevel(); + if (f !== 0) { + writer.writeInt32( + 5, + f + ); + } + f = message.getVipexp(); + if (f !== 0) { + writer.writeInt32( + 6, + f + ); + } + f = message.getSeat(); + if (f !== 0) { + writer.writeInt64( + 20, + f + ); + } + f = message.getGold(); + if (f !== 0) { + writer.writeInt64( + 25, + f + ); + } +}; + + +/** + * optional int64 userId = 1; + * @return {number} + */ +proto.pb.GameUser.prototype.getUserid = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.GameUser} returns this + */ +proto.pb.GameUser.prototype.setUserid = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string nickname = 2; + * @return {string} + */ +proto.pb.GameUser.prototype.getNickname = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.GameUser} returns this + */ +proto.pb.GameUser.prototype.setNickname = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string avatar = 3; + * @return {string} + */ +proto.pb.GameUser.prototype.getAvatar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.GameUser} returns this + */ +proto.pb.GameUser.prototype.setAvatar = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string avatarFrame = 4; + * @return {string} + */ +proto.pb.GameUser.prototype.getAvatarframe = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.pb.GameUser} returns this + */ +proto.pb.GameUser.prototype.setAvatarframe = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + +/** + * optional int32 vipLevel = 5; + * @return {number} + */ +proto.pb.GameUser.prototype.getViplevel = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.GameUser} returns this + */ +proto.pb.GameUser.prototype.setViplevel = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int32 vipExp = 6; + * @return {number} + */ +proto.pb.GameUser.prototype.getVipexp = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.GameUser} returns this + */ +proto.pb.GameUser.prototype.setVipexp = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional int64 seat = 20; + * @return {number} + */ +proto.pb.GameUser.prototype.getSeat = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 20, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.GameUser} returns this + */ +proto.pb.GameUser.prototype.setSeat = function(value) { + return jspb.Message.setProto3IntField(this, 20, value); +}; + + +/** + * optional int64 gold = 25; + * @return {number} + */ +proto.pb.GameUser.prototype.getGold = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 25, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.pb.GameUser} returns this + */ +proto.pb.GameUser.prototype.setGold = function(value) { + return jspb.Message.setProto3IntField(this, 25, value); +}; + + +goog.object.extend(exports, proto.pb); diff --git a/assets/scripts/wsclient.ts b/assets/scripts/network/wsclient.ts similarity index 100% rename from assets/scripts/wsclient.ts rename to assets/scripts/network/wsclient.ts