diff --git a/package-lock.json b/package-lock.json index d09cb0a..bab4ecb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,9 +24,11 @@ "@ngneat/transloco": "3.1.4", "apexcharts": "3.33.1", "crypto-js": "3.3.0", + "google-protobuf": "^3.20.1", "highlight.js": "11.4.0", "lodash-es": "4.17.21", "moment": "^2.29.4", + "nats.ws": "^1.8.1", "ng-apexcharts": "1.7.0", "ngx-markdown": "13.1.0", "ngx-quill": "16.1.2", @@ -50,6 +52,7 @@ "@tailwindcss/typography": "0.5.2", "@types/chroma-js": "2.1.3", "@types/crypto-js": "3.1.47", + "@types/google-protobuf": "^3.15.6", "@types/highlight.js": "10.1.0", "@types/jasmine": "3.10.3", "@types/lodash": "4.14.178", @@ -3519,6 +3522,12 @@ "@types/range-parser": "*" } }, + "node_modules/@types/google-protobuf": { + "version": "3.15.6", + "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.6.tgz", + "integrity": "sha512-pYVNNJ+winC4aek+lZp93sIKxnXt5qMkuKmaqS3WGuTq0Bw1ZDYNBgzG5kkdtwcv+GmYJGo3yEg6z2cKKAiEdw==", + "dev": true + }, "node_modules/@types/highlight.js": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-10.1.0.tgz", @@ -8113,6 +8122,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/google-protobuf": { + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.20.1.tgz", + "integrity": "sha512-XMf1+O32FjYIV3CYu6Tuh5PNbfNEU5Xu22X+Xkdb/DUexFlCzhvv7d5Iirm4AOwn8lv4al1YvIhzGrg2j9Zfzw==" + }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -10373,6 +10387,14 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/nats.ws": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/nats.ws/-/nats.ws-1.8.1.tgz", + "integrity": "sha512-7p1GkLfHTb42KX0wWZNEVEefYRQhsknE6tptMmr8oNzYA5gZ2BaZGQgXF+JUU9pBU6K+fVsClOrXt8nRugwDMg==", + "optionalDependencies": { + "nkeys.js": "^1.0.0-9" + } + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -10487,6 +10509,18 @@ "node-gyp-build": "^4.2.2" } }, + "node_modules/nkeys.js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/nkeys.js/-/nkeys.js-1.0.3.tgz", + "integrity": "sha512-p5Bpb/acPaQmCrbe4gNmMBY/naZJV8Q7m2B9UkXT8BQRC6wjX8zqD2ya8eZu9mpSXQffodV46HCP9OckmxcwYA==", + "optional": true, + "dependencies": { + "tweetnacl": "1.0.3" + }, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/node-addon-api": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", @@ -14174,6 +14208,12 @@ "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", "dev": true }, + "node_modules/tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "optional": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -17493,6 +17533,12 @@ "@types/range-parser": "*" } }, + "@types/google-protobuf": { + "version": "3.15.6", + "resolved": "https://registry.npmjs.org/@types/google-protobuf/-/google-protobuf-3.15.6.tgz", + "integrity": "sha512-pYVNNJ+winC4aek+lZp93sIKxnXt5qMkuKmaqS3WGuTq0Bw1ZDYNBgzG5kkdtwcv+GmYJGo3yEg6z2cKKAiEdw==", + "dev": true + }, "@types/highlight.js": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-10.1.0.tgz", @@ -20862,6 +20908,11 @@ "slash": "^3.0.0" } }, + "google-protobuf": { + "version": "3.20.1", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.20.1.tgz", + "integrity": "sha512-XMf1+O32FjYIV3CYu6Tuh5PNbfNEU5Xu22X+Xkdb/DUexFlCzhvv7d5Iirm4AOwn8lv4al1YvIhzGrg2j9Zfzw==" + }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -22528,6 +22579,14 @@ "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", "dev": true }, + "nats.ws": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/nats.ws/-/nats.ws-1.8.1.tgz", + "integrity": "sha512-7p1GkLfHTb42KX0wWZNEVEefYRQhsknE6tptMmr8oNzYA5gZ2BaZGQgXF+JUU9pBU6K+fVsClOrXt8nRugwDMg==", + "requires": { + "nkeys.js": "^1.0.0-9" + } + }, "natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", @@ -22610,6 +22669,15 @@ "node-gyp-build": "^4.2.2" } }, + "nkeys.js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/nkeys.js/-/nkeys.js-1.0.3.tgz", + "integrity": "sha512-p5Bpb/acPaQmCrbe4gNmMBY/naZJV8Q7m2B9UkXT8BQRC6wjX8zqD2ya8eZu9mpSXQffodV46HCP9OckmxcwYA==", + "optional": true, + "requires": { + "tweetnacl": "1.0.3" + } + }, "node-addon-api": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.2.1.tgz", @@ -25280,6 +25348,12 @@ } } }, + "tweetnacl": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-1.0.3.tgz", + "integrity": "sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw==", + "optional": true + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index 2b495f2..0bc1d5a 100644 --- a/package.json +++ b/package.json @@ -29,9 +29,11 @@ "@ngneat/transloco": "3.1.4", "apexcharts": "3.33.1", "crypto-js": "3.3.0", + "google-protobuf": "^3.20.1", "highlight.js": "11.4.0", "lodash-es": "4.17.21", "moment": "^2.29.4", + "nats.ws": "^1.8.1", "ng-apexcharts": "1.7.0", "ngx-markdown": "13.1.0", "ngx-quill": "16.1.2", @@ -55,6 +57,7 @@ "@tailwindcss/typography": "0.5.2", "@types/chroma-js": "2.1.3", "@types/crypto-js": "3.1.47", + "@types/google-protobuf": "^3.15.6", "@types/highlight.js": "10.1.0", "@types/jasmine": "3.10.3", "@types/lodash": "4.14.178", diff --git a/src/app/modules/protobuf/c2se/backend/identity_pb.d.ts b/src/app/modules/protobuf/c2se/backend/identity_pb.d.ts new file mode 100644 index 0000000..149ff1d --- /dev/null +++ b/src/app/modules/protobuf/c2se/backend/identity_pb.d.ts @@ -0,0 +1,87 @@ +// package: bet.beteran.c2se.backend.identity +// file: c2se/backend/identity.proto + +import * as jspb from 'google-protobuf'; +import * as protobuf_rpc_error_pb from '../../protobuf/rpc/error_pb'; + +export class SigninRequest extends jspb.Message { + getToken(): string; + setToken(value: string): void; + + getSecurityCode(): string; + setSecurityCode(value: string): void; + + getUsername(): string; + setUsername(value: string): void; + + getPassword(): string; + setPassword(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigninRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninRequest + ): SigninRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): SigninRequest; + static deserializeBinaryFromReader( + message: SigninRequest, + reader: jspb.BinaryReader + ): SigninRequest; +} + +export namespace SigninRequest { + export type AsObject = { + token: string; + securityCode: string; + username: string; + password: string; + }; +} + +export class SigninResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasSessionId(): boolean; + clearSessionId(): void; + getSessionId(): string; + setSessionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigninResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninResponse + ): SigninResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): SigninResponse; + static deserializeBinaryFromReader( + message: SigninResponse, + reader: jspb.BinaryReader + ): SigninResponse; +} + +export namespace SigninResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + sessionId: string; + }; +} diff --git a/src/app/modules/protobuf/c2se/backend/identity_pb.js b/src/app/modules/protobuf/c2se/backend/identity_pb.js new file mode 100644 index 0000000..42d4e71 --- /dev/null +++ b/src/app/modules/protobuf/c2se/backend/identity_pb.js @@ -0,0 +1,521 @@ +// source: c2se/backend/identity.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +var protobuf_rpc_error_pb = require("../../protobuf/rpc/error_pb.js"); +goog.object.extend(proto, protobuf_rpc_error_pb); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.identity.SigninRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.identity.SigninResponse", + 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.bet.beteran.c2se.backend.identity.SigninRequest = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.identity.SigninRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.identity.SigninRequest.displayName = + "proto.bet.beteran.c2se.backend.identity.SigninRequest"; +} +/** + * 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.bet.beteran.c2se.backend.identity.SigninResponse = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.identity.SigninResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.identity.SigninResponse.displayName = + "proto.bet.beteran.c2se.backend.identity.SigninResponse"; +} + +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.bet.beteran.c2se.backend.identity.SigninRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.identity.SigninRequest.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.bet.beteran.c2se.backend.identity.SigninRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.identity.SigninRequest.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + token: jspb.Message.getFieldWithDefault(msg, 1, ""), + securityCode: jspb.Message.getFieldWithDefault(msg, 2, ""), + username: jspb.Message.getFieldWithDefault(msg, 3, ""), + password: jspb.Message.getFieldWithDefault(msg, 4, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.backend.identity.SigninRequest(); + return proto.bet.beteran.c2se.backend.identity.SigninRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.backend.identity.SigninRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.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.setToken(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecurityCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.identity.SigninRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.backend.identity.SigninRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getToken(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getSecurityCode(); + if (f.length > 0) { + writer.writeString(2, f); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(3, f); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString(4, f); + } + }; + +/** + * optional string token = 1; + * @return {string} + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.getToken = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} returns this + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.setToken = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + +/** + * optional string security_code = 2; + * @return {string} + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.getSecurityCode = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} returns this + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.setSecurityCode = + function (value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + +/** + * optional string username = 3; + * @return {string} + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.getUsername = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} returns this + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.setUsername = + function (value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + +/** + * optional string password = 4; + * @return {string} + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.getPassword = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.backend.identity.SigninRequest} returns this + */ +proto.bet.beteran.c2se.backend.identity.SigninRequest.prototype.setPassword = + function (value) { + return jspb.Message.setProto3StringField(this, 4, value); + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.identity.SigninResponse.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.bet.beteran.c2se.backend.identity.SigninResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.identity.SigninResponse.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + sessionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.backend.identity.SigninResponse(); + return proto.bet.beteran.c2se.backend.identity.SigninResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.backend.identity.SigninResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.identity.SigninResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.backend.identity.SigninResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString(2, f); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} returns this + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} returns this + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional string session_id = 2; + * @return {string} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.getSessionId = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} returns this + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.setSessionId = + function (value) { + return jspb.Message.setField(this, 2, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} returns this + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.clearSessionId = + function () { + return jspb.Message.setField(this, 2, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.hasSessionId = + function () { + return jspb.Message.getField(this, 2) != null; + }; + +goog.object.extend(exports, proto.bet.beteran.c2se.backend.identity); diff --git a/src/app/modules/protobuf/c2se/backend/member_pb.d.ts b/src/app/modules/protobuf/c2se/backend/member_pb.d.ts new file mode 100644 index 0000000..2b8b1af --- /dev/null +++ b/src/app/modules/protobuf/c2se/backend/member_pb.d.ts @@ -0,0 +1,242 @@ +// package: bet.beteran.c2se.backend.member +// file: c2se/backend/member.proto + +import * as jspb from 'google-protobuf'; +import * as protobuf_rpc_error_pb from '../../protobuf/rpc/error_pb'; +import * as protobuf_pagination_pagination_pb from '../../protobuf/pagination/pagination_pb'; +import * as protobuf_pagination_search_pb from '../../protobuf/pagination/search_pb'; +import * as protobuf_pagination_sort_pb from '../../protobuf/pagination/sort_pb'; +import * as models_member_member_pb from '../../models/member/member_pb'; + +export class ListMembersRequest extends jspb.Message { + hasPagination(): boolean; + clearPagination(): void; + getPagination(): protobuf_pagination_pagination_pb.Pagination | undefined; + setPagination(value?: protobuf_pagination_pagination_pb.Pagination): void; + + clearSearchesList(): void; + getSearchesList(): Array; + setSearchesList(value: Array): void; + addSearches( + value?: protobuf_pagination_search_pb.Search, + index?: number + ): protobuf_pagination_search_pb.Search; + + clearSortsList(): void; + getSortsList(): Array; + setSortsList(value: Array): void; + addSorts( + value?: protobuf_pagination_sort_pb.Sort, + index?: number + ): protobuf_pagination_sort_pb.Sort; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListMembersRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: ListMembersRequest + ): ListMembersRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListMembersRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): ListMembersRequest; + static deserializeBinaryFromReader( + message: ListMembersRequest, + reader: jspb.BinaryReader + ): ListMembersRequest; +} + +export namespace ListMembersRequest { + export type AsObject = { + pagination?: protobuf_pagination_pagination_pb.Pagination.AsObject; + searchesList: Array; + sortsList: Array; + }; +} + +export class ListMembersResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + clearMembersList(): void; + getMembersList(): Array; + setMembersList(value: Array): void; + addMembers( + value?: models_member_member_pb.Member, + index?: number + ): models_member_member_pb.Member; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListMembersResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: ListMembersResponse + ): ListMembersResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: ListMembersResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): ListMembersResponse; + static deserializeBinaryFromReader( + message: ListMembersResponse, + reader: jspb.BinaryReader + ): ListMembersResponse; +} + +export namespace ListMembersResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + membersList: Array; + }; +} + +export class GetMemberRequest extends jspb.Message { + getId(): string; + setId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetMemberRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: GetMemberRequest + ): GetMemberRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetMemberRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): GetMemberRequest; + static deserializeBinaryFromReader( + message: GetMemberRequest, + reader: jspb.BinaryReader + ): GetMemberRequest; +} + +export namespace GetMemberRequest { + export type AsObject = { + id: string; + }; +} + +export class GetMemberResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasMember(): boolean; + clearMember(): void; + getMember(): models_member_member_pb.Member | undefined; + setMember(value?: models_member_member_pb.Member): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetMemberResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: GetMemberResponse + ): GetMemberResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetMemberResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): GetMemberResponse; + static deserializeBinaryFromReader( + message: GetMemberResponse, + reader: jspb.BinaryReader + ): GetMemberResponse; +} + +export namespace GetMemberResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + member?: models_member_member_pb.Member.AsObject; + }; +} + +export class GetMemberByUsernameRequest extends jspb.Message { + getUsername(): string; + setUsername(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetMemberByUsernameRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: GetMemberByUsernameRequest + ): GetMemberByUsernameRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetMemberByUsernameRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): GetMemberByUsernameRequest; + static deserializeBinaryFromReader( + message: GetMemberByUsernameRequest, + reader: jspb.BinaryReader + ): GetMemberByUsernameRequest; +} + +export namespace GetMemberByUsernameRequest { + export type AsObject = { + username: string; + }; +} + +export class GetMemberByUsernameResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasMember(): boolean; + clearMember(): void; + getMember(): models_member_member_pb.Member | undefined; + setMember(value?: models_member_member_pb.Member): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetMemberByUsernameResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: GetMemberByUsernameResponse + ): GetMemberByUsernameResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: GetMemberByUsernameResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): GetMemberByUsernameResponse; + static deserializeBinaryFromReader( + message: GetMemberByUsernameResponse, + reader: jspb.BinaryReader + ): GetMemberByUsernameResponse; +} + +export namespace GetMemberByUsernameResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + member?: models_member_member_pb.Member.AsObject; + }; +} diff --git a/src/app/modules/protobuf/c2se/backend/member_pb.js b/src/app/modules/protobuf/c2se/backend/member_pb.js new file mode 100644 index 0000000..de7a8b7 --- /dev/null +++ b/src/app/modules/protobuf/c2se/backend/member_pb.js @@ -0,0 +1,1515 @@ +// source: c2se/backend/member.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +var protobuf_rpc_error_pb = require("../../protobuf/rpc/error_pb.js"); +goog.object.extend(proto, protobuf_rpc_error_pb); +var protobuf_pagination_pagination_pb = require("../../protobuf/pagination/pagination_pb.js"); +goog.object.extend(proto, protobuf_pagination_pagination_pb); +var protobuf_pagination_search_pb = require("../../protobuf/pagination/search_pb.js"); +goog.object.extend(proto, protobuf_pagination_search_pb); +var protobuf_pagination_sort_pb = require("../../protobuf/pagination/sort_pb.js"); +goog.object.extend(proto, protobuf_pagination_sort_pb); +var models_member_member_pb = require("../../models/member/member_pb.js"); +goog.object.extend(proto, models_member_member_pb); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.member.GetMemberRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.member.GetMemberResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.member.ListMembersRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.member.ListMembersResponse", + 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.bet.beteran.c2se.backend.member.ListMembersRequest = function (opt_data) { + jspb.Message.initialize( + this, + opt_data, + 0, + -1, + proto.bet.beteran.c2se.backend.member.ListMembersRequest.repeatedFields_, + null + ); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.member.ListMembersRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.member.ListMembersRequest.displayName = + "proto.bet.beteran.c2se.backend.member.ListMembersRequest"; +} +/** + * 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.bet.beteran.c2se.backend.member.ListMembersResponse = function ( + opt_data +) { + jspb.Message.initialize( + this, + opt_data, + 0, + -1, + proto.bet.beteran.c2se.backend.member.ListMembersResponse.repeatedFields_, + null + ); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.member.ListMembersResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.member.ListMembersResponse.displayName = + "proto.bet.beteran.c2se.backend.member.ListMembersResponse"; +} +/** + * 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.bet.beteran.c2se.backend.member.GetMemberRequest = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.member.GetMemberRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.member.GetMemberRequest.displayName = + "proto.bet.beteran.c2se.backend.member.GetMemberRequest"; +} +/** + * 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.bet.beteran.c2se.backend.member.GetMemberResponse = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.member.GetMemberResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.member.GetMemberResponse.displayName = + "proto.bet.beteran.c2se.backend.member.GetMemberResponse"; +} +/** + * 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.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest = function ( + opt_data +) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.displayName = + "proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest"; +} +/** + * 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.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse = function ( + opt_data +) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.displayName = + "proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse"; +} + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.repeatedFields_ = [ + 2, 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.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.member.ListMembersRequest.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.bet.beteran.c2se.backend.member.ListMembersRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.member.ListMembersRequest.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + pagination: + (f = msg.getPagination()) && + protobuf_pagination_pagination_pb.Pagination.toObject( + includeInstance, + f + ), + searchesList: jspb.Message.toObjectList( + msg.getSearchesList(), + protobuf_pagination_search_pb.Search.toObject, + includeInstance + ), + sortsList: jspb.Message.toObjectList( + msg.getSortsList(), + protobuf_pagination_sort_pb.Sort.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.bet.beteran.c2se.backend.member.ListMembersRequest} + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.backend.member.ListMembersRequest(); + return proto.bet.beteran.c2se.backend.member.ListMembersRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.backend.member.ListMembersRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersRequest} + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_pagination_pagination_pb.Pagination(); + reader.readMessage( + value, + protobuf_pagination_pagination_pb.Pagination + .deserializeBinaryFromReader + ); + msg.setPagination(value); + break; + case 2: + var value = new protobuf_pagination_search_pb.Search(); + reader.readMessage( + value, + protobuf_pagination_search_pb.Search.deserializeBinaryFromReader + ); + msg.addSearches(value); + break; + case 3: + var value = new protobuf_pagination_sort_pb.Sort(); + reader.readMessage( + value, + protobuf_pagination_sort_pb.Sort.deserializeBinaryFromReader + ); + msg.addSorts(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.member.ListMembersRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.backend.member.ListMembersRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getPagination(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_pagination_pagination_pb.Pagination.serializeBinaryToWriter + ); + } + f = message.getSearchesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + protobuf_pagination_search_pb.Search.serializeBinaryToWriter + ); + } + f = message.getSortsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + protobuf_pagination_sort_pb.Sort.serializeBinaryToWriter + ); + } + }; + +/** + * optional bet.protobuf.pagination.Pagination pagination = 1; + * @return {?proto.bet.protobuf.pagination.Pagination} + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.getPagination = + function () { + return /** @type{?proto.bet.protobuf.pagination.Pagination} */ ( + jspb.Message.getWrapperField( + this, + protobuf_pagination_pagination_pb.Pagination, + 1 + ) + ); + }; + +/** + * @param {?proto.bet.protobuf.pagination.Pagination|undefined} value + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersRequest} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.setPagination = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersRequest} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.clearPagination = + function () { + return this.setPagination(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.hasPagination = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * repeated bet.protobuf.pagination.Search searches = 2; + * @return {!Array} + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.getSearchesList = + function () { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField( + this, + protobuf_pagination_search_pb.Search, + 2 + ) + ); + }; + +/** + * @param {!Array} value + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersRequest} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.setSearchesList = + function (value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); + }; + +/** + * @param {!proto.bet.protobuf.pagination.Search=} opt_value + * @param {number=} opt_index + * @return {!proto.bet.protobuf.pagination.Search} + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.addSearches = + function (opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField( + this, + 2, + opt_value, + proto.bet.protobuf.pagination.Search, + opt_index + ); + }; + +/** + * Clears the list making it empty but non-null. + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersRequest} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.clearSearchesList = + function () { + return this.setSearchesList([]); + }; + +/** + * repeated bet.protobuf.pagination.Sort sorts = 3; + * @return {!Array} + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.getSortsList = + function () { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField( + this, + protobuf_pagination_sort_pb.Sort, + 3 + ) + ); + }; + +/** + * @param {!Array} value + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersRequest} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.setSortsList = + function (value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); + }; + +/** + * @param {!proto.bet.protobuf.pagination.Sort=} opt_value + * @param {number=} opt_index + * @return {!proto.bet.protobuf.pagination.Sort} + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.addSorts = + function (opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField( + this, + 3, + opt_value, + proto.bet.protobuf.pagination.Sort, + opt_index + ); + }; + +/** + * Clears the list making it empty but non-null. + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersRequest} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.clearSortsList = + function () { + return this.setSortsList([]); + }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.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.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.member.ListMembersResponse.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.bet.beteran.c2se.backend.member.ListMembersResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.member.ListMembersResponse.toObject = + function (includeInstance, msg) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + membersList: jspb.Message.toObjectList( + msg.getMembersList(), + models_member_member_pb.Member.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.bet.beteran.c2se.backend.member.ListMembersResponse} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.backend.member.ListMembersResponse(); + return proto.bet.beteran.c2se.backend.member.ListMembersResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.backend.member.ListMembersResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersResponse} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = new models_member_member_pb.Member(); + reader.readMessage( + value, + models_member_member_pb.Member.deserializeBinaryFromReader + ); + msg.addMembers(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.member.ListMembersResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.backend.member.ListMembersResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = message.getMembersList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + models_member_member_pb.Member.serializeBinaryToWriter + ); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * repeated bet.beteran.member.Member members = 2; + * @return {!Array} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.getMembersList = + function () { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField( + this, + models_member_member_pb.Member, + 2 + ) + ); + }; + +/** + * @param {!Array} value + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.setMembersList = + function (value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); + }; + +/** + * @param {!proto.bet.beteran.member.Member=} opt_value + * @param {number=} opt_index + * @return {!proto.bet.beteran.member.Member} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.addMembers = + function (opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField( + this, + 2, + opt_value, + proto.bet.beteran.member.Member, + opt_index + ); + }; + +/** + * Clears the list making it empty but non-null. + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.clearMembersList = + function () { + return this.setMembersList([]); + }; + +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.bet.beteran.c2se.backend.member.GetMemberRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.member.GetMemberRequest.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.bet.beteran.c2se.backend.member.GetMemberRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.member.GetMemberRequest.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberRequest} + */ +proto.bet.beteran.c2se.backend.member.GetMemberRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.backend.member.GetMemberRequest(); + return proto.bet.beteran.c2se.backend.member.GetMemberRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.backend.member.GetMemberRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberRequest} + */ +proto.bet.beteran.c2se.backend.member.GetMemberRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.backend.member.GetMemberRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.member.GetMemberRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.backend.member.GetMemberRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.member.GetMemberRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; + +/** + * optional string id = 1; + * @return {string} + */ +proto.bet.beteran.c2se.backend.member.GetMemberRequest.prototype.getId = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberRequest} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberRequest.prototype.setId = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.member.GetMemberResponse.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.bet.beteran.c2se.backend.member.GetMemberResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.member.GetMemberResponse.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + member: + (f = msg.getMember()) && + models_member_member_pb.Member.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.bet.beteran.c2se.backend.member.GetMemberResponse} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.backend.member.GetMemberResponse(); + return proto.bet.beteran.c2se.backend.member.GetMemberResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.backend.member.GetMemberResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberResponse} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = new models_member_member_pb.Member(); + reader.readMessage( + value, + models_member_member_pb.Member.deserializeBinaryFromReader + ); + msg.setMember(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.member.GetMemberResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.backend.member.GetMemberResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = message.getMember(); + if (f != null) { + writer.writeMessage( + 2, + f, + models_member_member_pb.Member.serializeBinaryToWriter + ); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional bet.beteran.member.Member member = 2; + * @return {?proto.bet.beteran.member.Member} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.getMember = + function () { + return /** @type{?proto.bet.beteran.member.Member} */ ( + jspb.Message.getWrapperField(this, models_member_member_pb.Member, 2) + ); + }; + +/** + * @param {?proto.bet.beteran.member.Member|undefined} value + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.setMember = + function (value) { + return jspb.Message.setWrapperField(this, 2, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.clearMember = + function () { + return this.setMember(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.hasMember = + 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.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.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.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.toObject = + function (includeInstance, msg) { + var f, + obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest(); + return proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; + +/** + * optional string username = 1; + * @return {string} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.prototype.getUsername = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameRequest.prototype.setUsername = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.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.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.toObject = + function (includeInstance, msg) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + member: + (f = msg.getMember()) && + models_member_member_pb.Member.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.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse(); + return proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = new models_member_member_pb.Member(); + reader.readMessage( + value, + models_member_member_pb.Member.deserializeBinaryFromReader + ); + msg.setMember(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = message.getMember(); + if (f != null) { + writer.writeMessage( + 2, + f, + models_member_member_pb.Member.serializeBinaryToWriter + ); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional bet.beteran.member.Member member = 2; + * @return {?proto.bet.beteran.member.Member} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.getMember = + function () { + return /** @type{?proto.bet.beteran.member.Member} */ ( + jspb.Message.getWrapperField(this, models_member_member_pb.Member, 2) + ); + }; + +/** + * @param {?proto.bet.beteran.member.Member|undefined} value + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.setMember = + function (value) { + return jspb.Message.setWrapperField(this, 2, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.clearMember = + function () { + return this.setMember(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.hasMember = + function () { + return jspb.Message.getField(this, 2) != null; + }; + +goog.object.extend(exports, proto.bet.beteran.c2se.backend.member); diff --git a/src/app/modules/protobuf/c2se/common/identity_pb.d.ts b/src/app/modules/protobuf/c2se/common/identity_pb.d.ts new file mode 100644 index 0000000..6944505 --- /dev/null +++ b/src/app/modules/protobuf/c2se/common/identity_pb.d.ts @@ -0,0 +1,232 @@ +// package: bet.beteran.c2se.common.identity +// file: c2se/common/identity.proto + +import * as jspb from 'google-protobuf'; +import * as protobuf_rpc_error_pb from '../../protobuf/rpc/error_pb'; + +export class CheckUsernameForDuplicationRequest extends jspb.Message { + getUsername(): string; + setUsername(value: string): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): CheckUsernameForDuplicationRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckUsernameForDuplicationRequest + ): CheckUsernameForDuplicationRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckUsernameForDuplicationRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckUsernameForDuplicationRequest; + static deserializeBinaryFromReader( + message: CheckUsernameForDuplicationRequest, + reader: jspb.BinaryReader + ): CheckUsernameForDuplicationRequest; +} + +export namespace CheckUsernameForDuplicationRequest { + export type AsObject = { + username: string; + }; +} + +export class CheckUsernameForDuplicationResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasDuplicated(): boolean; + clearDuplicated(): void; + getDuplicated(): boolean; + setDuplicated(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): CheckUsernameForDuplicationResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckUsernameForDuplicationResponse + ): CheckUsernameForDuplicationResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckUsernameForDuplicationResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckUsernameForDuplicationResponse; + static deserializeBinaryFromReader( + message: CheckUsernameForDuplicationResponse, + reader: jspb.BinaryReader + ): CheckUsernameForDuplicationResponse; +} + +export namespace CheckUsernameForDuplicationResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + duplicated: boolean; + }; +} + +export class CheckNicknameForDuplicationRequest extends jspb.Message { + getNickname(): string; + setNickname(value: string): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): CheckNicknameForDuplicationRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckNicknameForDuplicationRequest + ): CheckNicknameForDuplicationRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckNicknameForDuplicationRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckNicknameForDuplicationRequest; + static deserializeBinaryFromReader( + message: CheckNicknameForDuplicationRequest, + reader: jspb.BinaryReader + ): CheckNicknameForDuplicationRequest; +} + +export namespace CheckNicknameForDuplicationRequest { + export type AsObject = { + nickname: string; + }; +} + +export class CheckNicknameForDuplicationResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasDuplicated(): boolean; + clearDuplicated(): void; + getDuplicated(): boolean; + setDuplicated(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): CheckNicknameForDuplicationResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckNicknameForDuplicationResponse + ): CheckNicknameForDuplicationResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckNicknameForDuplicationResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckNicknameForDuplicationResponse; + static deserializeBinaryFromReader( + message: CheckNicknameForDuplicationResponse, + reader: jspb.BinaryReader + ): CheckNicknameForDuplicationResponse; +} + +export namespace CheckNicknameForDuplicationResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + duplicated: boolean; + }; +} + +export class CaptchaRequest extends jspb.Message { + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CaptchaRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CaptchaRequest + ): CaptchaRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CaptchaRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): CaptchaRequest; + static deserializeBinaryFromReader( + message: CaptchaRequest, + reader: jspb.BinaryReader + ): CaptchaRequest; +} + +export namespace CaptchaRequest { + export type AsObject = {}; +} + +export class CaptchaResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasToken(): boolean; + clearToken(): void; + getToken(): string; + setToken(value: string): void; + + hasImage(): boolean; + clearImage(): void; + getImage(): string; + setImage(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CaptchaResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CaptchaResponse + ): CaptchaResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CaptchaResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): CaptchaResponse; + static deserializeBinaryFromReader( + message: CaptchaResponse, + reader: jspb.BinaryReader + ): CaptchaResponse; +} + +export namespace CaptchaResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + token: string; + image: string; + }; +} diff --git a/src/app/modules/protobuf/c2se/common/identity_pb.js b/src/app/modules/protobuf/c2se/common/identity_pb.js new file mode 100644 index 0000000..0bb9bdb --- /dev/null +++ b/src/app/modules/protobuf/c2se/common/identity_pb.js @@ -0,0 +1,1273 @@ +// source: c2se/common/identity.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +var protobuf_rpc_error_pb = require("../../protobuf/rpc/error_pb.js"); +goog.object.extend(proto, protobuf_rpc_error_pb); +goog.exportSymbol( + "proto.bet.beteran.c2se.common.identity.CaptchaRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.common.identity.CaptchaResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse", + 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.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.displayName = + "proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest"; +} +/** + * 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.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.displayName = + "proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse"; +} +/** + * 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.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.displayName = + "proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest"; +} +/** + * 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.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.displayName = + "proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse"; +} +/** + * 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.bet.beteran.c2se.common.identity.CaptchaRequest = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.common.identity.CaptchaRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.common.identity.CaptchaRequest.displayName = + "proto.bet.beteran.c2se.common.identity.CaptchaRequest"; +} +/** + * 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.bet.beteran.c2se.common.identity.CaptchaResponse = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.common.identity.CaptchaResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.common.identity.CaptchaResponse.displayName = + "proto.bet.beteran.c2se.common.identity.CaptchaResponse"; +} + +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.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.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.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.toObject = + function (includeInstance, msg) { + var f, + obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest(); + return proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.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; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; + +/** + * optional string username = 1; + * @return {string} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.prototype.getUsername = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest.prototype.setUsername = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.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.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.toObject = + function (includeInstance, msg) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse(); + return proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDuplicated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool(2, f); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional bool duplicated = 2; + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.getDuplicated = + function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 2, false) + ); + }; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.setDuplicated = + function (value) { + return jspb.Message.setField(this, 2, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.clearDuplicated = + function () { + return jspb.Message.setField(this, 2, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.hasDuplicated = + 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.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.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.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.toObject = + function (includeInstance, msg) { + var f, + obj = { + nickname: jspb.Message.getFieldWithDefault(msg, 1, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest(); + return proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNickname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getNickname(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; + +/** + * optional string nickname = 1; + * @return {string} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.prototype.getNickname = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest.prototype.setNickname = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.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.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.toObject = + function (includeInstance, msg) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse(); + return proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDuplicated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool(2, f); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional bool duplicated = 2; + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.getDuplicated = + function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 2, false) + ); + }; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.setDuplicated = + function (value) { + return jspb.Message.setField(this, 2, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.clearDuplicated = + function () { + return jspb.Message.setField(this, 2, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.hasDuplicated = + 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.bet.beteran.c2se.common.identity.CaptchaRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.common.identity.CaptchaRequest.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.bet.beteran.c2se.common.identity.CaptchaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.common.identity.CaptchaRequest.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.bet.beteran.c2se.common.identity.CaptchaRequest} + */ +proto.bet.beteran.c2se.common.identity.CaptchaRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.common.identity.CaptchaRequest(); + return proto.bet.beteran.c2se.common.identity.CaptchaRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.common.identity.CaptchaRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaRequest} + */ +proto.bet.beteran.c2se.common.identity.CaptchaRequest.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.bet.beteran.c2se.common.identity.CaptchaRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.common.identity.CaptchaRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.common.identity.CaptchaRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.common.identity.CaptchaRequest.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.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.common.identity.CaptchaResponse.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.bet.beteran.c2se.common.identity.CaptchaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.common.identity.CaptchaResponse.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + token: jspb.Message.getFieldWithDefault(msg, 2, ""), + image: 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.bet.beteran.c2se.common.identity.CaptchaResponse} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.common.identity.CaptchaResponse(); + return proto.bet.beteran.c2se.common.identity.CaptchaResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToken(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setImage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.common.identity.CaptchaResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString(2, f); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString(3, f); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional string token = 2; + * @return {string} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.getToken = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.setToken = + function (value) { + return jspb.Message.setField(this, 2, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.clearToken = + function () { + return jspb.Message.setField(this, 2, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.hasToken = + function () { + return jspb.Message.getField(this, 2) != null; + }; + +/** + * optional string image = 3; + * @return {string} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.getImage = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.setImage = + function (value) { + return jspb.Message.setField(this, 3, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.clearImage = + function () { + return jspb.Message.setField(this, 3, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.hasImage = + function () { + return jspb.Message.getField(this, 3) != null; + }; + +goog.object.extend(exports, proto.bet.beteran.c2se.common.identity); diff --git a/src/app/modules/protobuf/c2se/core/network_pb.d.ts b/src/app/modules/protobuf/c2se/core/network_pb.d.ts new file mode 100644 index 0000000..71ac8f1 --- /dev/null +++ b/src/app/modules/protobuf/c2se/core/network_pb.d.ts @@ -0,0 +1,4 @@ +// package: +// file: c2se/core/network.proto + +import * as jspb from 'google-protobuf'; diff --git a/src/app/modules/protobuf/c2se/core/network_pb.js b/src/app/modules/protobuf/c2se/core/network_pb.js new file mode 100644 index 0000000..08751ba --- /dev/null +++ b/src/app/modules/protobuf/c2se/core/network_pb.js @@ -0,0 +1,18 @@ +// source: c2se/core/network.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); diff --git a/src/app/modules/protobuf/c2se/frontend/identity_pb.d.ts b/src/app/modules/protobuf/c2se/frontend/identity_pb.d.ts new file mode 100644 index 0000000..3687d79 --- /dev/null +++ b/src/app/modules/protobuf/c2se/frontend/identity_pb.d.ts @@ -0,0 +1,87 @@ +// package: bet.beteran.c2se.frontend.identity +// file: c2se/frontend/identity.proto + +import * as jspb from 'google-protobuf'; +import * as protobuf_rpc_error_pb from '../../protobuf/rpc/error_pb'; + +export class SigninRequest extends jspb.Message { + getToken(): string; + setToken(value: string): void; + + getSecurityCode(): string; + setSecurityCode(value: string): void; + + getUsername(): string; + setUsername(value: string): void; + + getPassword(): string; + setPassword(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigninRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninRequest + ): SigninRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): SigninRequest; + static deserializeBinaryFromReader( + message: SigninRequest, + reader: jspb.BinaryReader + ): SigninRequest; +} + +export namespace SigninRequest { + export type AsObject = { + token: string; + securityCode: string; + username: string; + password: string; + }; +} + +export class SigninResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasSessionId(): boolean; + clearSessionId(): void; + getSessionId(): string; + setSessionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigninResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninResponse + ): SigninResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): SigninResponse; + static deserializeBinaryFromReader( + message: SigninResponse, + reader: jspb.BinaryReader + ): SigninResponse; +} + +export namespace SigninResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + sessionId: string; + }; +} diff --git a/src/app/modules/protobuf/c2se/frontend/identity_pb.js b/src/app/modules/protobuf/c2se/frontend/identity_pb.js new file mode 100644 index 0000000..b6aa1a7 --- /dev/null +++ b/src/app/modules/protobuf/c2se/frontend/identity_pb.js @@ -0,0 +1,521 @@ +// source: c2se/frontend/identity.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +var protobuf_rpc_error_pb = require("../../protobuf/rpc/error_pb.js"); +goog.object.extend(proto, protobuf_rpc_error_pb); +goog.exportSymbol( + "proto.bet.beteran.c2se.frontend.identity.SigninRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.frontend.identity.SigninResponse", + 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.bet.beteran.c2se.frontend.identity.SigninRequest = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.frontend.identity.SigninRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.frontend.identity.SigninRequest.displayName = + "proto.bet.beteran.c2se.frontend.identity.SigninRequest"; +} +/** + * 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.bet.beteran.c2se.frontend.identity.SigninResponse = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.frontend.identity.SigninResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.frontend.identity.SigninResponse.displayName = + "proto.bet.beteran.c2se.frontend.identity.SigninResponse"; +} + +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.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.frontend.identity.SigninRequest.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.bet.beteran.c2se.frontend.identity.SigninRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.frontend.identity.SigninRequest.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + token: jspb.Message.getFieldWithDefault(msg, 1, ""), + securityCode: jspb.Message.getFieldWithDefault(msg, 2, ""), + username: jspb.Message.getFieldWithDefault(msg, 3, ""), + password: jspb.Message.getFieldWithDefault(msg, 4, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninRequest} + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.frontend.identity.SigninRequest(); + return proto.bet.beteran.c2se.frontend.identity.SigninRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.frontend.identity.SigninRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninRequest} + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.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.setToken(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecurityCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.frontend.identity.SigninRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.frontend.identity.SigninRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getToken(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getSecurityCode(); + if (f.length > 0) { + writer.writeString(2, f); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(3, f); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString(4, f); + } + }; + +/** + * optional string token = 1; + * @return {string} + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.getToken = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninRequest} returns this + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.setToken = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + +/** + * optional string security_code = 2; + * @return {string} + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.getSecurityCode = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninRequest} returns this + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.setSecurityCode = + function (value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + +/** + * optional string username = 3; + * @return {string} + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.getUsername = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninRequest} returns this + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.setUsername = + function (value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + +/** + * optional string password = 4; + * @return {string} + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.getPassword = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninRequest} returns this + */ +proto.bet.beteran.c2se.frontend.identity.SigninRequest.prototype.setPassword = + function (value) { + return jspb.Message.setProto3StringField(this, 4, value); + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.frontend.identity.SigninResponse.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.bet.beteran.c2se.frontend.identity.SigninResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.frontend.identity.SigninResponse.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + sessionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninResponse} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.frontend.identity.SigninResponse(); + return proto.bet.beteran.c2se.frontend.identity.SigninResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.frontend.identity.SigninResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninResponse} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.frontend.identity.SigninResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.c2se.frontend.identity.SigninResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString(2, f); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninResponse} returns this + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninResponse} returns this + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional string session_id = 2; + * @return {string} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.getSessionId = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninResponse} returns this + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.setSessionId = + function (value) { + return jspb.Message.setField(this, 2, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninResponse} returns this + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.clearSessionId = + function () { + return jspb.Message.setField(this, 2, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.hasSessionId = + function () { + return jspb.Message.getField(this, 2) != null; + }; + +goog.object.extend(exports, proto.bet.beteran.c2se.frontend.identity); diff --git a/src/app/modules/protobuf/models/core/network_pb.d.ts b/src/app/modules/protobuf/models/core/network_pb.d.ts new file mode 100644 index 0000000..f2324e4 --- /dev/null +++ b/src/app/modules/protobuf/models/core/network_pb.d.ts @@ -0,0 +1,44 @@ +// package: bet.beteran.core.network +// file: models/core/network.proto + +import * as jspb from 'google-protobuf'; + +export class Client extends jspb.Message { + getClientIp(): string; + setClientIp(value: string): void; + + hasSiteUrl(): boolean; + clearSiteUrl(): void; + getSiteUrl(): string; + setSiteUrl(value: string): void; + + hasSessionId(): boolean; + clearSessionId(): void; + getSessionId(): string; + setSessionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Client.AsObject; + static toObject(includeInstance: boolean, msg: Client): Client.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Client, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Client; + static deserializeBinaryFromReader( + message: Client, + reader: jspb.BinaryReader + ): Client; +} + +export namespace Client { + export type AsObject = { + clientIp: string; + siteUrl: string; + sessionId: string; + }; +} diff --git a/src/app/modules/protobuf/models/core/network_pb.js b/src/app/modules/protobuf/models/core/network_pb.js new file mode 100644 index 0000000..2769830 --- /dev/null +++ b/src/app/modules/protobuf/models/core/network_pb.js @@ -0,0 +1,262 @@ +// source: models/core/network.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +goog.exportSymbol("proto.bet.beteran.core.network.Client", 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.bet.beteran.core.network.Client = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.core.network.Client, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.core.network.Client.displayName = + "proto.bet.beteran.core.network.Client"; +} + +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.bet.beteran.core.network.Client.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.core.network.Client.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.bet.beteran.core.network.Client} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.core.network.Client.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + clientIp: jspb.Message.getFieldWithDefault(msg, 1, ""), + siteUrl: jspb.Message.getFieldWithDefault(msg, 2, ""), + sessionId: 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.bet.beteran.core.network.Client} + */ +proto.bet.beteran.core.network.Client.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.core.network.Client(); + return proto.bet.beteran.core.network.Client.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.core.network.Client} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.core.network.Client} + */ +proto.bet.beteran.core.network.Client.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.setClientIp(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSiteUrl(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSessionId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.core.network.Client.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.core.network.Client.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.core.network.Client} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.core.network.Client.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getClientIp(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString(2, f); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString(3, f); + } +}; + +/** + * optional string client_ip = 1; + * @return {string} + */ +proto.bet.beteran.core.network.Client.prototype.getClientIp = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.core.network.Client} returns this + */ +proto.bet.beteran.core.network.Client.prototype.setClientIp = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional string site_url = 2; + * @return {string} + */ +proto.bet.beteran.core.network.Client.prototype.getSiteUrl = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.core.network.Client} returns this + */ +proto.bet.beteran.core.network.Client.prototype.setSiteUrl = function (value) { + return jspb.Message.setField(this, 2, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.core.network.Client} returns this + */ +proto.bet.beteran.core.network.Client.prototype.clearSiteUrl = function () { + return jspb.Message.setField(this, 2, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.core.network.Client.prototype.hasSiteUrl = function () { + return jspb.Message.getField(this, 2) != null; +}; + +/** + * optional string session_id = 3; + * @return {string} + */ +proto.bet.beteran.core.network.Client.prototype.getSessionId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.core.network.Client} returns this + */ +proto.bet.beteran.core.network.Client.prototype.setSessionId = function ( + value +) { + return jspb.Message.setField(this, 3, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.core.network.Client} returns this + */ +proto.bet.beteran.core.network.Client.prototype.clearSessionId = function () { + return jspb.Message.setField(this, 3, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.core.network.Client.prototype.hasSessionId = function () { + return jspb.Message.getField(this, 3) != null; +}; + +goog.object.extend(exports, proto.bet.beteran.core.network); diff --git a/src/app/modules/protobuf/models/member/member_class_pb.d.ts b/src/app/modules/protobuf/models/member/member_class_pb.d.ts new file mode 100644 index 0000000..43b3e1e --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_class_pb.d.ts @@ -0,0 +1,59 @@ +// package: bet.beteran.member +// file: models/member/member_class.proto + +import * as jspb from 'google-protobuf'; + +export class MemberClass extends jspb.Message { + getId(): string; + setId(value: string): void; + + hasParent(): boolean; + clearParent(): void; + getParent(): MemberClass | undefined; + setParent(value?: MemberClass): void; + + getName(): string; + setName(value: string): void; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + getUpdatedAt(): number; + setUpdatedAt(value: number): void; + + hasDeletedAt(): boolean; + clearDeletedAt(): void; + getDeletedAt(): number; + setDeletedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MemberClass.AsObject; + static toObject( + includeInstance: boolean, + msg: MemberClass + ): MemberClass.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: MemberClass, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): MemberClass; + static deserializeBinaryFromReader( + message: MemberClass, + reader: jspb.BinaryReader + ): MemberClass; +} + +export namespace MemberClass { + export type AsObject = { + id: string; + parent?: MemberClass.AsObject; + name: string; + createdAt: number; + updatedAt: number; + deletedAt: number; + }; +} diff --git a/src/app/modules/protobuf/models/member/member_class_pb.js b/src/app/modules/protobuf/models/member/member_class_pb.js new file mode 100644 index 0000000..a76f1f6 --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_class_pb.js @@ -0,0 +1,347 @@ +// source: models/member/member_class.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +goog.exportSymbol("proto.bet.beteran.member.MemberClass", 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.bet.beteran.member.MemberClass = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.member.MemberClass, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.member.MemberClass.displayName = + "proto.bet.beteran.member.MemberClass"; +} + +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.bet.beteran.member.MemberClass.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.member.MemberClass.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.bet.beteran.member.MemberClass} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.member.MemberClass.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + parent: + (f = msg.getParent()) && + proto.bet.beteran.member.MemberClass.toObject(includeInstance, f), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + createdAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + deletedAt: jspb.Message.getFieldWithDefault(msg, 6, 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.bet.beteran.member.MemberClass} + */ +proto.bet.beteran.member.MemberClass.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.member.MemberClass(); + return proto.bet.beteran.member.MemberClass.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.member.MemberClass} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.member.MemberClass} + */ +proto.bet.beteran.member.MemberClass.deserializeBinaryFromReader = function ( + msg, + reader +) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new proto.bet.beteran.member.MemberClass(); + reader.readMessage( + value, + proto.bet.beteran.member.MemberClass.deserializeBinaryFromReader + ); + msg.setParent(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpdatedAt(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDeletedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.member.MemberClass.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.member.MemberClass.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.member.MemberClass} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.member.MemberClass.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getParent(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.member.MemberClass.serializeBinaryToWriter + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString(3, f); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64(4, f); + } + f = message.getUpdatedAt(); + if (f !== 0) { + writer.writeUint64(5, f); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint64(6, f); + } +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.bet.beteran.member.MemberClass.prototype.getId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.MemberClass} returns this + */ +proto.bet.beteran.member.MemberClass.prototype.setId = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional MemberClass parent = 2; + * @return {?proto.bet.beteran.member.MemberClass} + */ +proto.bet.beteran.member.MemberClass.prototype.getParent = function () { + return /** @type{?proto.bet.beteran.member.MemberClass} */ ( + jspb.Message.getWrapperField(this, proto.bet.beteran.member.MemberClass, 2) + ); +}; + +/** + * @param {?proto.bet.beteran.member.MemberClass|undefined} value + * @return {!proto.bet.beteran.member.MemberClass} returns this + */ +proto.bet.beteran.member.MemberClass.prototype.setParent = function (value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.member.MemberClass} returns this + */ +proto.bet.beteran.member.MemberClass.prototype.clearParent = function () { + return this.setParent(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.MemberClass.prototype.hasParent = function () { + return jspb.Message.getField(this, 2) != null; +}; + +/** + * optional string name = 3; + * @return {string} + */ +proto.bet.beteran.member.MemberClass.prototype.getName = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.MemberClass} returns this + */ +proto.bet.beteran.member.MemberClass.prototype.setName = function (value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + +/** + * optional uint64 created_at = 4; + * @return {number} + */ +proto.bet.beteran.member.MemberClass.prototype.getCreatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberClass} returns this + */ +proto.bet.beteran.member.MemberClass.prototype.setCreatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + +/** + * optional uint64 updated_at = 5; + * @return {number} + */ +proto.bet.beteran.member.MemberClass.prototype.getUpdatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberClass} returns this + */ +proto.bet.beteran.member.MemberClass.prototype.setUpdatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + +/** + * optional uint64 deleted_at = 6; + * @return {number} + */ +proto.bet.beteran.member.MemberClass.prototype.getDeletedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberClass} returns this + */ +proto.bet.beteran.member.MemberClass.prototype.setDeletedAt = function (value) { + return jspb.Message.setField(this, 6, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.member.MemberClass} returns this + */ +proto.bet.beteran.member.MemberClass.prototype.clearDeletedAt = function () { + return jspb.Message.setField(this, 6, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.MemberClass.prototype.hasDeletedAt = function () { + return jspb.Message.getField(this, 6) != null; +}; + +goog.object.extend(exports, proto.bet.beteran.member); diff --git a/src/app/modules/protobuf/models/member/member_level_pb.d.ts b/src/app/modules/protobuf/models/member/member_level_pb.d.ts new file mode 100644 index 0000000..19bf709 --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_level_pb.d.ts @@ -0,0 +1,57 @@ +// package: bet.beteran.member +// file: models/member/member_level.proto + +import * as jspb from 'google-protobuf'; + +export class MemberLevel extends jspb.Message { + getId(): string; + setId(value: string): void; + + getName(): string; + setName(value: string): void; + + getOrder(): number; + setOrder(value: number): void; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + getUpdatedAt(): number; + setUpdatedAt(value: number): void; + + hasDeletedAt(): boolean; + clearDeletedAt(): void; + getDeletedAt(): number; + setDeletedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MemberLevel.AsObject; + static toObject( + includeInstance: boolean, + msg: MemberLevel + ): MemberLevel.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: MemberLevel, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): MemberLevel; + static deserializeBinaryFromReader( + message: MemberLevel, + reader: jspb.BinaryReader + ): MemberLevel; +} + +export namespace MemberLevel { + export type AsObject = { + id: string; + name: string; + order: number; + createdAt: number; + updatedAt: number; + deletedAt: number; + }; +} diff --git a/src/app/modules/protobuf/models/member/member_level_pb.js b/src/app/modules/protobuf/models/member/member_level_pb.js new file mode 100644 index 0000000..51d208f --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_level_pb.js @@ -0,0 +1,319 @@ +// source: models/member/member_level.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +goog.exportSymbol("proto.bet.beteran.member.MemberLevel", 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.bet.beteran.member.MemberLevel = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.member.MemberLevel, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.member.MemberLevel.displayName = + "proto.bet.beteran.member.MemberLevel"; +} + +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.bet.beteran.member.MemberLevel.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.member.MemberLevel.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.bet.beteran.member.MemberLevel} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.member.MemberLevel.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + name: jspb.Message.getFieldWithDefault(msg, 2, ""), + order: jspb.Message.getFieldWithDefault(msg, 3, 0), + createdAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + deletedAt: jspb.Message.getFieldWithDefault(msg, 6, 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.bet.beteran.member.MemberLevel} + */ +proto.bet.beteran.member.MemberLevel.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.member.MemberLevel(); + return proto.bet.beteran.member.MemberLevel.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.member.MemberLevel} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.member.MemberLevel} + */ +proto.bet.beteran.member.MemberLevel.deserializeBinaryFromReader = function ( + msg, + reader +) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint32()); + msg.setOrder(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpdatedAt(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDeletedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.member.MemberLevel.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.member.MemberLevel.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.member.MemberLevel} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.member.MemberLevel.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString(2, f); + } + f = message.getOrder(); + if (f !== 0) { + writer.writeUint32(3, f); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64(4, f); + } + f = message.getUpdatedAt(); + if (f !== 0) { + writer.writeUint64(5, f); + } + f = /** @type {number} */ (jspb.Message.getField(message, 6)); + if (f != null) { + writer.writeUint64(6, f); + } +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.bet.beteran.member.MemberLevel.prototype.getId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.MemberLevel} returns this + */ +proto.bet.beteran.member.MemberLevel.prototype.setId = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional string name = 2; + * @return {string} + */ +proto.bet.beteran.member.MemberLevel.prototype.getName = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.MemberLevel} returns this + */ +proto.bet.beteran.member.MemberLevel.prototype.setName = function (value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + +/** + * optional uint32 order = 3; + * @return {number} + */ +proto.bet.beteran.member.MemberLevel.prototype.getOrder = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberLevel} returns this + */ +proto.bet.beteran.member.MemberLevel.prototype.setOrder = function (value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + +/** + * optional uint64 created_at = 4; + * @return {number} + */ +proto.bet.beteran.member.MemberLevel.prototype.getCreatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberLevel} returns this + */ +proto.bet.beteran.member.MemberLevel.prototype.setCreatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + +/** + * optional uint64 updated_at = 5; + * @return {number} + */ +proto.bet.beteran.member.MemberLevel.prototype.getUpdatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberLevel} returns this + */ +proto.bet.beteran.member.MemberLevel.prototype.setUpdatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + +/** + * optional uint64 deleted_at = 6; + * @return {number} + */ +proto.bet.beteran.member.MemberLevel.prototype.getDeletedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberLevel} returns this + */ +proto.bet.beteran.member.MemberLevel.prototype.setDeletedAt = function (value) { + return jspb.Message.setField(this, 6, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.member.MemberLevel} returns this + */ +proto.bet.beteran.member.MemberLevel.prototype.clearDeletedAt = function () { + return jspb.Message.setField(this, 6, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.MemberLevel.prototype.hasDeletedAt = function () { + return jspb.Message.getField(this, 6) != null; +}; + +goog.object.extend(exports, proto.bet.beteran.member); diff --git a/src/app/modules/protobuf/models/member/member_pb.d.ts b/src/app/modules/protobuf/models/member/member_pb.d.ts new file mode 100644 index 0000000..372dac7 --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_pb.d.ts @@ -0,0 +1,129 @@ +// package: bet.beteran.member +// file: models/member/member.proto + +import * as jspb from 'google-protobuf'; +import * as models_member_member_class_pb from '../../models/member/member_class_pb'; +import * as models_member_member_level_pb from '../../models/member/member_level_pb'; +import * as models_member_member_site_pb from '../../models/member/member_site_pb'; + +export class Member extends jspb.Message { + getId(): string; + setId(value: string): void; + + getDomainId(): string; + setDomainId(value: string): void; + + hasMemberClass(): boolean; + clearMemberClass(): void; + getMemberClass(): models_member_member_class_pb.MemberClass | undefined; + setMemberClass(value?: models_member_member_class_pb.MemberClass): void; + + hasMemberLevel(): boolean; + clearMemberLevel(): void; + getMemberLevel(): models_member_member_level_pb.MemberLevel | undefined; + setMemberLevel(value?: models_member_member_level_pb.MemberLevel): void; + + hasMemberSite(): boolean; + clearMemberSite(): void; + getMemberSite(): models_member_member_site_pb.MemberSite | undefined; + setMemberSite(value?: models_member_member_site_pb.MemberSite): void; + + hasReferrer(): boolean; + clearReferrer(): void; + getReferrer(): Member | undefined; + setReferrer(value?: Member): void; + + getReferredCount(): number; + setReferredCount(value: number): void; + + getUsername(): string; + setUsername(value: string): void; + + getNickname(): string; + setNickname(value: string): void; + + hasMobilePhoneNumber(): boolean; + clearMobilePhoneNumber(): void; + getMobilePhoneNumber(): string; + setMobilePhoneNumber(value: string): void; + + getState(): MemberStateMap[keyof MemberStateMap]; + setState(value: MemberStateMap[keyof MemberStateMap]): void; + + hasStateChangedAt(): boolean; + clearStateChangedAt(): void; + getStateChangedAt(): number; + setStateChangedAt(value: number): void; + + hasLastSigninedIp(): boolean; + clearLastSigninedIp(): void; + getLastSigninedIp(): string; + setLastSigninedIp(value: string): void; + + hasLastSigninedAt(): boolean; + clearLastSigninedAt(): void; + getLastSigninedAt(): number; + setLastSigninedAt(value: number): void; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + getUpdatedAt(): number; + setUpdatedAt(value: number): void; + + hasDeletedAt(): boolean; + clearDeletedAt(): void; + getDeletedAt(): number; + setDeletedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Member.AsObject; + static toObject(includeInstance: boolean, msg: Member): Member.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Member, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Member; + static deserializeBinaryFromReader( + message: Member, + reader: jspb.BinaryReader + ): Member; +} + +export namespace Member { + export type AsObject = { + id: string; + domainId: string; + memberClass?: models_member_member_class_pb.MemberClass.AsObject; + memberLevel?: models_member_member_level_pb.MemberLevel.AsObject; + memberSite?: models_member_member_site_pb.MemberSite.AsObject; + referrer?: Member.AsObject; + referredCount: number; + username: string; + nickname: string; + mobilePhoneNumber: string; + state: MemberStateMap[keyof MemberStateMap]; + stateChangedAt: number; + lastSigninedIp: string; + lastSigninedAt: number; + createdAt: number; + updatedAt: number; + deletedAt: number; + }; +} + +export interface MemberStateMap { + NONE: 0; + NORMAL: 1; + PENDING: 2; + WITHDRAWAL: 3; + DORMANCY: 4; + BLACKLIST: 5; + SUSPENDED: 6; +} + +export const MemberState: MemberStateMap; diff --git a/src/app/modules/protobuf/models/member/member_pb.js b/src/app/modules/protobuf/models/member/member_pb.js new file mode 100644 index 0000000..7f7bae4 --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_pb.js @@ -0,0 +1,808 @@ +// source: models/member/member.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +var models_member_member_class_pb = require("../../models/member/member_class_pb.js"); +goog.object.extend(proto, models_member_member_class_pb); +var models_member_member_level_pb = require("../../models/member/member_level_pb.js"); +goog.object.extend(proto, models_member_member_level_pb); +var models_member_member_site_pb = require("../../models/member/member_site_pb.js"); +goog.object.extend(proto, models_member_member_site_pb); +goog.exportSymbol("proto.bet.beteran.member.Member", null, global); +goog.exportSymbol("proto.bet.beteran.member.MemberState", 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.bet.beteran.member.Member = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.member.Member, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.member.Member.displayName = + "proto.bet.beteran.member.Member"; +} + +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.bet.beteran.member.Member.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.member.Member.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.bet.beteran.member.Member} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.member.Member.toObject = function (includeInstance, msg) { + var f, + obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + domainId: jspb.Message.getFieldWithDefault(msg, 2, ""), + memberClass: + (f = msg.getMemberClass()) && + models_member_member_class_pb.MemberClass.toObject( + includeInstance, + f + ), + memberLevel: + (f = msg.getMemberLevel()) && + models_member_member_level_pb.MemberLevel.toObject( + includeInstance, + f + ), + memberSite: + (f = msg.getMemberSite()) && + models_member_member_site_pb.MemberSite.toObject(includeInstance, f), + referrer: + (f = msg.getReferrer()) && + proto.bet.beteran.member.Member.toObject(includeInstance, f), + referredCount: jspb.Message.getFieldWithDefault(msg, 7, 0), + username: jspb.Message.getFieldWithDefault(msg, 8, ""), + nickname: jspb.Message.getFieldWithDefault(msg, 9, ""), + mobilePhoneNumber: jspb.Message.getFieldWithDefault(msg, 10, ""), + state: jspb.Message.getFieldWithDefault(msg, 11, 0), + stateChangedAt: jspb.Message.getFieldWithDefault(msg, 12, 0), + lastSigninedIp: jspb.Message.getFieldWithDefault(msg, 13, ""), + lastSigninedAt: jspb.Message.getFieldWithDefault(msg, 14, 0), + createdAt: jspb.Message.getFieldWithDefault(msg, 15, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 16, 0), + deletedAt: jspb.Message.getFieldWithDefault(msg, 17, 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.bet.beteran.member.Member} + */ +proto.bet.beteran.member.Member.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.member.Member(); + return proto.bet.beteran.member.Member.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.member.Member} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.member.Member} + */ +proto.bet.beteran.member.Member.deserializeBinaryFromReader = function ( + msg, + reader +) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setDomainId(value); + break; + case 3: + var value = new models_member_member_class_pb.MemberClass(); + reader.readMessage( + value, + models_member_member_class_pb.MemberClass.deserializeBinaryFromReader + ); + msg.setMemberClass(value); + break; + case 4: + var value = new models_member_member_level_pb.MemberLevel(); + reader.readMessage( + value, + models_member_member_level_pb.MemberLevel.deserializeBinaryFromReader + ); + msg.setMemberLevel(value); + break; + case 5: + var value = new models_member_member_site_pb.MemberSite(); + reader.readMessage( + value, + models_member_member_site_pb.MemberSite.deserializeBinaryFromReader + ); + msg.setMemberSite(value); + break; + case 6: + var value = new proto.bet.beteran.member.Member(); + reader.readMessage( + value, + proto.bet.beteran.member.Member.deserializeBinaryFromReader + ); + msg.setReferrer(value); + break; + case 7: + var value = /** @type {number} */ (reader.readUint64()); + msg.setReferredCount(value); + break; + case 8: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 9: + var value = /** @type {string} */ (reader.readString()); + msg.setNickname(value); + break; + case 10: + var value = /** @type {string} */ (reader.readString()); + msg.setMobilePhoneNumber(value); + break; + case 11: + var value = /** @type {!proto.bet.beteran.member.MemberState} */ ( + reader.readEnum() + ); + msg.setState(value); + break; + case 12: + var value = /** @type {number} */ (reader.readUint64()); + msg.setStateChangedAt(value); + break; + case 13: + var value = /** @type {string} */ (reader.readString()); + msg.setLastSigninedIp(value); + break; + case 14: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLastSigninedAt(value); + break; + case 15: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 16: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpdatedAt(value); + break; + case 17: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDeletedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.member.Member.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.member.Member.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.member.Member} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.member.Member.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getDomainId(); + if (f.length > 0) { + writer.writeString(2, f); + } + f = message.getMemberClass(); + if (f != null) { + writer.writeMessage( + 3, + f, + models_member_member_class_pb.MemberClass.serializeBinaryToWriter + ); + } + f = message.getMemberLevel(); + if (f != null) { + writer.writeMessage( + 4, + f, + models_member_member_level_pb.MemberLevel.serializeBinaryToWriter + ); + } + f = message.getMemberSite(); + if (f != null) { + writer.writeMessage( + 5, + f, + models_member_member_site_pb.MemberSite.serializeBinaryToWriter + ); + } + f = message.getReferrer(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.bet.beteran.member.Member.serializeBinaryToWriter + ); + } + f = message.getReferredCount(); + if (f !== 0) { + writer.writeUint64(7, f); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(8, f); + } + f = message.getNickname(); + if (f.length > 0) { + writer.writeString(9, f); + } + f = /** @type {string} */ (jspb.Message.getField(message, 10)); + if (f != null) { + writer.writeString(10, f); + } + f = message.getState(); + if (f !== 0.0) { + writer.writeEnum(11, f); + } + f = /** @type {number} */ (jspb.Message.getField(message, 12)); + if (f != null) { + writer.writeUint64(12, f); + } + f = /** @type {string} */ (jspb.Message.getField(message, 13)); + if (f != null) { + writer.writeString(13, f); + } + f = /** @type {number} */ (jspb.Message.getField(message, 14)); + if (f != null) { + writer.writeUint64(14, f); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64(15, f); + } + f = message.getUpdatedAt(); + if (f !== 0) { + writer.writeUint64(16, f); + } + f = /** @type {number} */ (jspb.Message.getField(message, 17)); + if (f != null) { + writer.writeUint64(17, f); + } +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.bet.beteran.member.Member.prototype.getId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setId = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional string domain_id = 2; + * @return {string} + */ +proto.bet.beteran.member.Member.prototype.getDomainId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setDomainId = function (value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + +/** + * optional MemberClass member_class = 3; + * @return {?proto.bet.beteran.member.MemberClass} + */ +proto.bet.beteran.member.Member.prototype.getMemberClass = function () { + return /** @type{?proto.bet.beteran.member.MemberClass} */ ( + jspb.Message.getWrapperField( + this, + models_member_member_class_pb.MemberClass, + 3 + ) + ); +}; + +/** + * @param {?proto.bet.beteran.member.MemberClass|undefined} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setMemberClass = function (value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearMemberClass = function () { + return this.setMemberClass(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasMemberClass = function () { + return jspb.Message.getField(this, 3) != null; +}; + +/** + * optional MemberLevel member_level = 4; + * @return {?proto.bet.beteran.member.MemberLevel} + */ +proto.bet.beteran.member.Member.prototype.getMemberLevel = function () { + return /** @type{?proto.bet.beteran.member.MemberLevel} */ ( + jspb.Message.getWrapperField( + this, + models_member_member_level_pb.MemberLevel, + 4 + ) + ); +}; + +/** + * @param {?proto.bet.beteran.member.MemberLevel|undefined} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setMemberLevel = function (value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearMemberLevel = function () { + return this.setMemberLevel(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasMemberLevel = function () { + return jspb.Message.getField(this, 4) != null; +}; + +/** + * optional MemberSite member_site = 5; + * @return {?proto.bet.beteran.member.MemberSite} + */ +proto.bet.beteran.member.Member.prototype.getMemberSite = function () { + return /** @type{?proto.bet.beteran.member.MemberSite} */ ( + jspb.Message.getWrapperField( + this, + models_member_member_site_pb.MemberSite, + 5 + ) + ); +}; + +/** + * @param {?proto.bet.beteran.member.MemberSite|undefined} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setMemberSite = function (value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearMemberSite = function () { + return this.setMemberSite(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasMemberSite = function () { + return jspb.Message.getField(this, 5) != null; +}; + +/** + * optional Member referrer = 6; + * @return {?proto.bet.beteran.member.Member} + */ +proto.bet.beteran.member.Member.prototype.getReferrer = function () { + return /** @type{?proto.bet.beteran.member.Member} */ ( + jspb.Message.getWrapperField(this, proto.bet.beteran.member.Member, 6) + ); +}; + +/** + * @param {?proto.bet.beteran.member.Member|undefined} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setReferrer = function (value) { + return jspb.Message.setWrapperField(this, 6, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearReferrer = function () { + return this.setReferrer(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasReferrer = function () { + return jspb.Message.getField(this, 6) != null; +}; + +/** + * optional uint64 referred_count = 7; + * @return {number} + */ +proto.bet.beteran.member.Member.prototype.getReferredCount = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setReferredCount = function (value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + +/** + * optional string username = 8; + * @return {string} + */ +proto.bet.beteran.member.Member.prototype.getUsername = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setUsername = function (value) { + return jspb.Message.setProto3StringField(this, 8, value); +}; + +/** + * optional string nickname = 9; + * @return {string} + */ +proto.bet.beteran.member.Member.prototype.getNickname = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setNickname = function (value) { + return jspb.Message.setProto3StringField(this, 9, value); +}; + +/** + * optional string mobile_phone_number = 10; + * @return {string} + */ +proto.bet.beteran.member.Member.prototype.getMobilePhoneNumber = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setMobilePhoneNumber = function ( + value +) { + return jspb.Message.setField(this, 10, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearMobilePhoneNumber = function () { + return jspb.Message.setField(this, 10, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasMobilePhoneNumber = function () { + return jspb.Message.getField(this, 10) != null; +}; + +/** + * optional MemberState state = 11; + * @return {!proto.bet.beteran.member.MemberState} + */ +proto.bet.beteran.member.Member.prototype.getState = function () { + return /** @type {!proto.bet.beteran.member.MemberState} */ ( + jspb.Message.getFieldWithDefault(this, 11, 0) + ); +}; + +/** + * @param {!proto.bet.beteran.member.MemberState} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setState = function (value) { + return jspb.Message.setProto3EnumField(this, 11, value); +}; + +/** + * optional uint64 state_changed_at = 12; + * @return {number} + */ +proto.bet.beteran.member.Member.prototype.getStateChangedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 12, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setStateChangedAt = function (value) { + return jspb.Message.setField(this, 12, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearStateChangedAt = function () { + return jspb.Message.setField(this, 12, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasStateChangedAt = function () { + return jspb.Message.getField(this, 12) != null; +}; + +/** + * optional string last_signined_ip = 13; + * @return {string} + */ +proto.bet.beteran.member.Member.prototype.getLastSigninedIp = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 13, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setLastSigninedIp = function (value) { + return jspb.Message.setField(this, 13, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearLastSigninedIp = function () { + return jspb.Message.setField(this, 13, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasLastSigninedIp = function () { + return jspb.Message.getField(this, 13) != null; +}; + +/** + * optional uint64 last_signined_at = 14; + * @return {number} + */ +proto.bet.beteran.member.Member.prototype.getLastSigninedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 14, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setLastSigninedAt = function (value) { + return jspb.Message.setField(this, 14, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearLastSigninedAt = function () { + return jspb.Message.setField(this, 14, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasLastSigninedAt = function () { + return jspb.Message.getField(this, 14) != null; +}; + +/** + * optional uint64 created_at = 15; + * @return {number} + */ +proto.bet.beteran.member.Member.prototype.getCreatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 15, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setCreatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 15, value); +}; + +/** + * optional uint64 updated_at = 16; + * @return {number} + */ +proto.bet.beteran.member.Member.prototype.getUpdatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 16, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setUpdatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 16, value); +}; + +/** + * optional uint64 deleted_at = 17; + * @return {number} + */ +proto.bet.beteran.member.Member.prototype.getDeletedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 17, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.setDeletedAt = function (value) { + return jspb.Message.setField(this, 17, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.member.Member} returns this + */ +proto.bet.beteran.member.Member.prototype.clearDeletedAt = function () { + return jspb.Message.setField(this, 17, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.Member.prototype.hasDeletedAt = function () { + return jspb.Message.getField(this, 17) != null; +}; + +/** + * @enum {number} + */ +proto.bet.beteran.member.MemberState = { + NONE: 0, + NORMAL: 1, + PENDING: 2, + WITHDRAWAL: 3, + DORMANCY: 4, + BLACKLIST: 5, + SUSPENDED: 6, +}; + +goog.object.extend(exports, proto.bet.beteran.member); diff --git a/src/app/modules/protobuf/models/member/member_session_pb.d.ts b/src/app/modules/protobuf/models/member/member_session_pb.d.ts new file mode 100644 index 0000000..0ccfcf7 --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_session_pb.d.ts @@ -0,0 +1,58 @@ +// package: bet.beteran.member +// file: models/member/member_session.proto + +import * as jspb from 'google-protobuf'; +import * as models_member_member_pb from '../../models/member/member_pb'; + +export class MemberSession extends jspb.Message { + getId(): string; + setId(value: string): void; + + hasMember(): boolean; + clearMember(): void; + getMember(): models_member_member_pb.Member | undefined; + setMember(value?: models_member_member_pb.Member): void; + + getData(): string; + setData(value: string): void; + + getLastAccessedAt(): number; + setLastAccessedAt(value: number): void; + + getExpiresAt(): number; + setExpiresAt(value: number): void; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MemberSession.AsObject; + static toObject( + includeInstance: boolean, + msg: MemberSession + ): MemberSession.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: MemberSession, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): MemberSession; + static deserializeBinaryFromReader( + message: MemberSession, + reader: jspb.BinaryReader + ): MemberSession; +} + +export namespace MemberSession { + export type AsObject = { + id: string; + member?: models_member_member_pb.Member.AsObject; + data: string; + lastAccessedAt: number; + expiresAt: number; + createdAt: number; + }; +} diff --git a/src/app/modules/protobuf/models/member/member_session_pb.js b/src/app/modules/protobuf/models/member/member_session_pb.js new file mode 100644 index 0000000..7c8e3f0 --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_session_pb.js @@ -0,0 +1,340 @@ +// source: models/member/member_session.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +var models_member_member_pb = require("../../models/member/member_pb.js"); +goog.object.extend(proto, models_member_member_pb); +goog.exportSymbol("proto.bet.beteran.member.MemberSession", 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.bet.beteran.member.MemberSession = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.member.MemberSession, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.member.MemberSession.displayName = + "proto.bet.beteran.member.MemberSession"; +} + +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.bet.beteran.member.MemberSession.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.member.MemberSession.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.bet.beteran.member.MemberSession} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.member.MemberSession.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + member: + (f = msg.getMember()) && + models_member_member_pb.Member.toObject(includeInstance, f), + data: jspb.Message.getFieldWithDefault(msg, 3, ""), + lastAccessedAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiresAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + createdAt: jspb.Message.getFieldWithDefault(msg, 6, 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.bet.beteran.member.MemberSession} + */ +proto.bet.beteran.member.MemberSession.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.member.MemberSession(); + return proto.bet.beteran.member.MemberSession.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.member.MemberSession} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.member.MemberSession} + */ +proto.bet.beteran.member.MemberSession.deserializeBinaryFromReader = function ( + msg, + reader +) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = new models_member_member_pb.Member(); + reader.readMessage( + value, + models_member_member_pb.Member.deserializeBinaryFromReader + ); + msg.setMember(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setData(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLastAccessedAt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setExpiresAt(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.member.MemberSession.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.member.MemberSession.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.member.MemberSession} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.member.MemberSession.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getMember(); + if (f != null) { + writer.writeMessage( + 2, + f, + models_member_member_pb.Member.serializeBinaryToWriter + ); + } + f = message.getData(); + if (f.length > 0) { + writer.writeString(3, f); + } + f = message.getLastAccessedAt(); + if (f !== 0) { + writer.writeUint64(4, f); + } + f = message.getExpiresAt(); + if (f !== 0) { + writer.writeUint64(5, f); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64(6, f); + } +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.bet.beteran.member.MemberSession.prototype.getId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.MemberSession} returns this + */ +proto.bet.beteran.member.MemberSession.prototype.setId = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional Member member = 2; + * @return {?proto.bet.beteran.member.Member} + */ +proto.bet.beteran.member.MemberSession.prototype.getMember = function () { + return /** @type{?proto.bet.beteran.member.Member} */ ( + jspb.Message.getWrapperField(this, models_member_member_pb.Member, 2) + ); +}; + +/** + * @param {?proto.bet.beteran.member.Member|undefined} value + * @return {!proto.bet.beteran.member.MemberSession} returns this + */ +proto.bet.beteran.member.MemberSession.prototype.setMember = function (value) { + return jspb.Message.setWrapperField(this, 2, value); +}; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.member.MemberSession} returns this + */ +proto.bet.beteran.member.MemberSession.prototype.clearMember = function () { + return this.setMember(undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.MemberSession.prototype.hasMember = function () { + return jspb.Message.getField(this, 2) != null; +}; + +/** + * optional string data = 3; + * @return {string} + */ +proto.bet.beteran.member.MemberSession.prototype.getData = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.MemberSession} returns this + */ +proto.bet.beteran.member.MemberSession.prototype.setData = function (value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + +/** + * optional uint64 last_accessed_at = 4; + * @return {number} + */ +proto.bet.beteran.member.MemberSession.prototype.getLastAccessedAt = + function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); + }; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberSession} returns this + */ +proto.bet.beteran.member.MemberSession.prototype.setLastAccessedAt = function ( + value +) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + +/** + * optional uint64 expires_at = 5; + * @return {number} + */ +proto.bet.beteran.member.MemberSession.prototype.getExpiresAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberSession} returns this + */ +proto.bet.beteran.member.MemberSession.prototype.setExpiresAt = function ( + value +) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + +/** + * optional uint64 created_at = 6; + * @return {number} + */ +proto.bet.beteran.member.MemberSession.prototype.getCreatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberSession} returns this + */ +proto.bet.beteran.member.MemberSession.prototype.setCreatedAt = function ( + value +) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + +goog.object.extend(exports, proto.bet.beteran.member); diff --git a/src/app/modules/protobuf/models/member/member_site_pb.d.ts b/src/app/modules/protobuf/models/member/member_site_pb.d.ts new file mode 100644 index 0000000..0883be8 --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_site_pb.d.ts @@ -0,0 +1,53 @@ +// package: bet.beteran.member +// file: models/member/member_site.proto + +import * as jspb from 'google-protobuf'; + +export class MemberSite extends jspb.Message { + getId(): string; + setId(value: string): void; + + getUrl(): string; + setUrl(value: string): void; + + getCreatedAt(): number; + setCreatedAt(value: number): void; + + getUpdatedAt(): number; + setUpdatedAt(value: number): void; + + hasDeletedAt(): boolean; + clearDeletedAt(): void; + getDeletedAt(): number; + setDeletedAt(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): MemberSite.AsObject; + static toObject( + includeInstance: boolean, + msg: MemberSite + ): MemberSite.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: MemberSite, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): MemberSite; + static deserializeBinaryFromReader( + message: MemberSite, + reader: jspb.BinaryReader + ): MemberSite; +} + +export namespace MemberSite { + export type AsObject = { + id: string; + url: string; + createdAt: number; + updatedAt: number; + deletedAt: number; + }; +} diff --git a/src/app/modules/protobuf/models/member/member_site_pb.js b/src/app/modules/protobuf/models/member/member_site_pb.js new file mode 100644 index 0000000..1b645b1 --- /dev/null +++ b/src/app/modules/protobuf/models/member/member_site_pb.js @@ -0,0 +1,294 @@ +// source: models/member/member_site.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +goog.exportSymbol("proto.bet.beteran.member.MemberSite", 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.bet.beteran.member.MemberSite = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.member.MemberSite, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.member.MemberSite.displayName = + "proto.bet.beteran.member.MemberSite"; +} + +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.bet.beteran.member.MemberSite.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.member.MemberSite.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.bet.beteran.member.MemberSite} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.member.MemberSite.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + url: jspb.Message.getFieldWithDefault(msg, 2, ""), + createdAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + updatedAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + deletedAt: 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.bet.beteran.member.MemberSite} + */ +proto.bet.beteran.member.MemberSite.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.member.MemberSite(); + return proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.member.MemberSite} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.member.MemberSite} + */ +proto.bet.beteran.member.MemberSite.deserializeBinaryFromReader = function ( + msg, + reader +) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCreatedAt(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint64()); + msg.setUpdatedAt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readUint64()); + msg.setDeletedAt(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.member.MemberSite.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.member.MemberSite.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.member.MemberSite} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.member.MemberSite.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getUrl(); + if (f.length > 0) { + writer.writeString(2, f); + } + f = message.getCreatedAt(); + if (f !== 0) { + writer.writeUint64(3, f); + } + f = message.getUpdatedAt(); + if (f !== 0) { + writer.writeUint64(4, f); + } + f = /** @type {number} */ (jspb.Message.getField(message, 5)); + if (f != null) { + writer.writeUint64(5, f); + } +}; + +/** + * optional string id = 1; + * @return {string} + */ +proto.bet.beteran.member.MemberSite.prototype.getId = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.MemberSite} returns this + */ +proto.bet.beteran.member.MemberSite.prototype.setId = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional string url = 2; + * @return {string} + */ +proto.bet.beteran.member.MemberSite.prototype.getUrl = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.beteran.member.MemberSite} returns this + */ +proto.bet.beteran.member.MemberSite.prototype.setUrl = function (value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + +/** + * optional uint64 created_at = 3; + * @return {number} + */ +proto.bet.beteran.member.MemberSite.prototype.getCreatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberSite} returns this + */ +proto.bet.beteran.member.MemberSite.prototype.setCreatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + +/** + * optional uint64 updated_at = 4; + * @return {number} + */ +proto.bet.beteran.member.MemberSite.prototype.getUpdatedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberSite} returns this + */ +proto.bet.beteran.member.MemberSite.prototype.setUpdatedAt = function (value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + +/** + * optional uint64 deleted_at = 5; + * @return {number} + */ +proto.bet.beteran.member.MemberSite.prototype.getDeletedAt = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.beteran.member.MemberSite} returns this + */ +proto.bet.beteran.member.MemberSite.prototype.setDeletedAt = function (value) { + return jspb.Message.setField(this, 5, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.member.MemberSite} returns this + */ +proto.bet.beteran.member.MemberSite.prototype.clearDeletedAt = function () { + return jspb.Message.setField(this, 5, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.member.MemberSite.prototype.hasDeletedAt = function () { + return jspb.Message.getField(this, 5) != null; +}; + +goog.object.extend(exports, proto.bet.beteran.member); diff --git a/src/app/modules/protobuf/protobuf/pagination/pagination_pb.d.ts b/src/app/modules/protobuf/protobuf/pagination/pagination_pb.d.ts new file mode 100644 index 0000000..6c96ede --- /dev/null +++ b/src/app/modules/protobuf/protobuf/pagination/pagination_pb.d.ts @@ -0,0 +1,43 @@ +// package: bet.protobuf.pagination +// file: protobuf/pagination/pagination.proto + +import * as jspb from 'google-protobuf'; + +export class Pagination extends jspb.Message { + hasPage(): boolean; + clearPage(): void; + getPage(): number; + setPage(value: number): void; + + hasPageSize(): boolean; + clearPageSize(): void; + getPageSize(): number; + setPageSize(value: number): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Pagination.AsObject; + static toObject( + includeInstance: boolean, + msg: Pagination + ): Pagination.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Pagination, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Pagination; + static deserializeBinaryFromReader( + message: Pagination, + reader: jspb.BinaryReader + ): Pagination; +} + +export namespace Pagination { + export type AsObject = { + page: number; + pageSize: number; + }; +} diff --git a/src/app/modules/protobuf/protobuf/pagination/pagination_pb.js b/src/app/modules/protobuf/protobuf/pagination/pagination_pb.js new file mode 100644 index 0000000..a8319d3 --- /dev/null +++ b/src/app/modules/protobuf/protobuf/pagination/pagination_pb.js @@ -0,0 +1,239 @@ +// source: protobuf/pagination/pagination.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +goog.exportSymbol("proto.bet.protobuf.pagination.Pagination", 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.bet.protobuf.pagination.Pagination = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.protobuf.pagination.Pagination, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.protobuf.pagination.Pagination.displayName = + "proto.bet.protobuf.pagination.Pagination"; +} + +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.bet.protobuf.pagination.Pagination.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.protobuf.pagination.Pagination.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.bet.protobuf.pagination.Pagination} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.protobuf.pagination.Pagination.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + page: jspb.Message.getFieldWithDefault(msg, 1, 0), + pageSize: 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.bet.protobuf.pagination.Pagination} + */ +proto.bet.protobuf.pagination.Pagination.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.protobuf.pagination.Pagination(); + return proto.bet.protobuf.pagination.Pagination.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.protobuf.pagination.Pagination} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.protobuf.pagination.Pagination} + */ +proto.bet.protobuf.pagination.Pagination.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPage(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint32()); + msg.setPageSize(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.protobuf.pagination.Pagination.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.protobuf.pagination.Pagination.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.protobuf.pagination.Pagination} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.protobuf.pagination.Pagination.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = /** @type {number} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeUint32(1, f); + } + f = /** @type {number} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint32(2, f); + } +}; + +/** + * optional uint32 page = 1; + * @return {number} + */ +proto.bet.protobuf.pagination.Pagination.prototype.getPage = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.protobuf.pagination.Pagination} returns this + */ +proto.bet.protobuf.pagination.Pagination.prototype.setPage = function (value) { + return jspb.Message.setField(this, 1, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.protobuf.pagination.Pagination} returns this + */ +proto.bet.protobuf.pagination.Pagination.prototype.clearPage = function () { + return jspb.Message.setField(this, 1, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.protobuf.pagination.Pagination.prototype.hasPage = function () { + return jspb.Message.getField(this, 1) != null; +}; + +/** + * optional uint32 page_size = 2; + * @return {number} + */ +proto.bet.protobuf.pagination.Pagination.prototype.getPageSize = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.protobuf.pagination.Pagination} returns this + */ +proto.bet.protobuf.pagination.Pagination.prototype.setPageSize = function ( + value +) { + return jspb.Message.setField(this, 2, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.protobuf.pagination.Pagination} returns this + */ +proto.bet.protobuf.pagination.Pagination.prototype.clearPageSize = function () { + return jspb.Message.setField(this, 2, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.protobuf.pagination.Pagination.prototype.hasPageSize = function () { + return jspb.Message.getField(this, 2) != null; +}; + +goog.object.extend(exports, proto.bet.protobuf.pagination); diff --git a/src/app/modules/protobuf/protobuf/pagination/search_pb.d.ts b/src/app/modules/protobuf/protobuf/pagination/search_pb.d.ts new file mode 100644 index 0000000..8a5072b --- /dev/null +++ b/src/app/modules/protobuf/protobuf/pagination/search_pb.d.ts @@ -0,0 +1,36 @@ +// package: bet.protobuf.pagination +// file: protobuf/pagination/search.proto + +import * as jspb from 'google-protobuf'; + +export class Search extends jspb.Message { + getKey(): string; + setKey(value: string): void; + + getValue(): string; + setValue(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Search.AsObject; + static toObject(includeInstance: boolean, msg: Search): Search.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Search, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Search; + static deserializeBinaryFromReader( + message: Search, + reader: jspb.BinaryReader + ): Search; +} + +export namespace Search { + export type AsObject = { + key: string; + value: string; + }; +} diff --git a/src/app/modules/protobuf/protobuf/pagination/search_pb.js b/src/app/modules/protobuf/protobuf/pagination/search_pb.js new file mode 100644 index 0000000..e0a7259 --- /dev/null +++ b/src/app/modules/protobuf/protobuf/pagination/search_pb.js @@ -0,0 +1,203 @@ +// source: protobuf/pagination/search.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +goog.exportSymbol("proto.bet.protobuf.pagination.Search", 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.bet.protobuf.pagination.Search = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.protobuf.pagination.Search, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.protobuf.pagination.Search.displayName = + "proto.bet.protobuf.pagination.Search"; +} + +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.bet.protobuf.pagination.Search.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.protobuf.pagination.Search.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.bet.protobuf.pagination.Search} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.protobuf.pagination.Search.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + key: jspb.Message.getFieldWithDefault(msg, 1, ""), + value: jspb.Message.getFieldWithDefault(msg, 2, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.protobuf.pagination.Search} + */ +proto.bet.protobuf.pagination.Search.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.protobuf.pagination.Search(); + return proto.bet.protobuf.pagination.Search.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.protobuf.pagination.Search} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.protobuf.pagination.Search} + */ +proto.bet.protobuf.pagination.Search.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.setKey(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setValue(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.protobuf.pagination.Search.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.protobuf.pagination.Search.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.protobuf.pagination.Search} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.protobuf.pagination.Search.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getKey(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getValue(); + if (f.length > 0) { + writer.writeString(2, f); + } +}; + +/** + * optional string key = 1; + * @return {string} + */ +proto.bet.protobuf.pagination.Search.prototype.getKey = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.protobuf.pagination.Search} returns this + */ +proto.bet.protobuf.pagination.Search.prototype.setKey = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional string value = 2; + * @return {string} + */ +proto.bet.protobuf.pagination.Search.prototype.getValue = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.protobuf.pagination.Search} returns this + */ +proto.bet.protobuf.pagination.Search.prototype.setValue = function (value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + +goog.object.extend(exports, proto.bet.protobuf.pagination); diff --git a/src/app/modules/protobuf/protobuf/pagination/sort_pb.d.ts b/src/app/modules/protobuf/protobuf/pagination/sort_pb.d.ts new file mode 100644 index 0000000..1a8333e --- /dev/null +++ b/src/app/modules/protobuf/protobuf/pagination/sort_pb.d.ts @@ -0,0 +1,43 @@ +// package: bet.protobuf.pagination +// file: protobuf/pagination/sort.proto + +import * as jspb from 'google-protobuf'; + +export class Sort extends jspb.Message { + getBy(): string; + setBy(value: string): void; + + getOrder(): SortOrderMap[keyof SortOrderMap]; + setOrder(value: SortOrderMap[keyof SortOrderMap]): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Sort.AsObject; + static toObject(includeInstance: boolean, msg: Sort): Sort.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Sort, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Sort; + static deserializeBinaryFromReader( + message: Sort, + reader: jspb.BinaryReader + ): Sort; +} + +export namespace Sort { + export type AsObject = { + by: string; + order: SortOrderMap[keyof SortOrderMap]; + }; +} + +export interface SortOrderMap { + ASC: 0; + DESC: 1; +} + +export const SortOrder: SortOrderMap; diff --git a/src/app/modules/protobuf/protobuf/pagination/sort_pb.js b/src/app/modules/protobuf/protobuf/pagination/sort_pb.js new file mode 100644 index 0000000..573dc58 --- /dev/null +++ b/src/app/modules/protobuf/protobuf/pagination/sort_pb.js @@ -0,0 +1,216 @@ +// source: protobuf/pagination/sort.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +goog.exportSymbol("proto.bet.protobuf.pagination.Sort", null, global); +goog.exportSymbol("proto.bet.protobuf.pagination.SortOrder", 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.bet.protobuf.pagination.Sort = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.protobuf.pagination.Sort, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.protobuf.pagination.Sort.displayName = + "proto.bet.protobuf.pagination.Sort"; +} + +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.bet.protobuf.pagination.Sort.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.protobuf.pagination.Sort.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.bet.protobuf.pagination.Sort} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.protobuf.pagination.Sort.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + by: jspb.Message.getFieldWithDefault(msg, 1, ""), + order: 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.bet.protobuf.pagination.Sort} + */ +proto.bet.protobuf.pagination.Sort.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.protobuf.pagination.Sort(); + return proto.bet.protobuf.pagination.Sort.deserializeBinaryFromReader( + msg, + reader + ); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.protobuf.pagination.Sort} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.protobuf.pagination.Sort} + */ +proto.bet.protobuf.pagination.Sort.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.setBy(value); + break; + case 2: + var value = /** @type {!proto.bet.protobuf.pagination.SortOrder} */ ( + reader.readEnum() + ); + msg.setOrder(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.protobuf.pagination.Sort.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.protobuf.pagination.Sort.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.protobuf.pagination.Sort} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.protobuf.pagination.Sort.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getBy(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getOrder(); + if (f !== 0.0) { + writer.writeEnum(2, f); + } +}; + +/** + * optional string by = 1; + * @return {string} + */ +proto.bet.protobuf.pagination.Sort.prototype.getBy = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.protobuf.pagination.Sort} returns this + */ +proto.bet.protobuf.pagination.Sort.prototype.setBy = function (value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + +/** + * optional SortOrder order = 2; + * @return {!proto.bet.protobuf.pagination.SortOrder} + */ +proto.bet.protobuf.pagination.Sort.prototype.getOrder = function () { + return /** @type {!proto.bet.protobuf.pagination.SortOrder} */ ( + jspb.Message.getFieldWithDefault(this, 2, 0) + ); +}; + +/** + * @param {!proto.bet.protobuf.pagination.SortOrder} value + * @return {!proto.bet.protobuf.pagination.Sort} returns this + */ +proto.bet.protobuf.pagination.Sort.prototype.setOrder = function (value) { + return jspb.Message.setProto3EnumField(this, 2, value); +}; + +/** + * @enum {number} + */ +proto.bet.protobuf.pagination.SortOrder = { + ASC: 0, + DESC: 1, +}; + +goog.object.extend(exports, proto.bet.protobuf.pagination); diff --git a/src/app/modules/protobuf/protobuf/rpc/error_pb.d.ts b/src/app/modules/protobuf/protobuf/rpc/error_pb.d.ts new file mode 100644 index 0000000..55d87e5 --- /dev/null +++ b/src/app/modules/protobuf/protobuf/rpc/error_pb.d.ts @@ -0,0 +1,46 @@ +// package: bet.protobuf.rpc +// file: protobuf/rpc/error.proto + +import * as jspb from 'google-protobuf'; + +export class Error extends jspb.Message { + getCode(): number; + setCode(value: number): void; + + hasMessage(): boolean; + clearMessage(): void; + getMessage(): string; + setMessage(value: string): void; + + hasData(): boolean; + clearData(): void; + getData(): Uint8Array | string; + getData_asU8(): Uint8Array; + getData_asB64(): string; + setData(value: Uint8Array | string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Error.AsObject; + static toObject(includeInstance: boolean, msg: Error): Error.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Error, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Error; + static deserializeBinaryFromReader( + message: Error, + reader: jspb.BinaryReader + ): Error; +} + +export namespace Error { + export type AsObject = { + code: number; + message: string; + data: Uint8Array | string; + }; +} diff --git a/src/app/modules/protobuf/protobuf/rpc/error_pb.js b/src/app/modules/protobuf/protobuf/rpc/error_pb.js new file mode 100644 index 0000000..20b0e39 --- /dev/null +++ b/src/app/modules/protobuf/protobuf/rpc/error_pb.js @@ -0,0 +1,272 @@ +// source: protobuf/rpc/error.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +goog.exportSymbol("proto.bet.protobuf.rpc.Error", 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.bet.protobuf.rpc.Error = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.protobuf.rpc.Error, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.protobuf.rpc.Error.displayName = "proto.bet.protobuf.rpc.Error"; +} + +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.bet.protobuf.rpc.Error.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.protobuf.rpc.Error.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.bet.protobuf.rpc.Error} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.protobuf.rpc.Error.toObject = function (includeInstance, msg) { + var f, + obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + 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.bet.protobuf.rpc.Error} + */ +proto.bet.protobuf.rpc.Error.deserializeBinary = function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.protobuf.rpc.Error(); + return proto.bet.protobuf.rpc.Error.deserializeBinaryFromReader(msg, reader); +}; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.protobuf.rpc.Error} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.protobuf.rpc.Error} + */ +proto.bet.protobuf.rpc.Error.deserializeBinaryFromReader = function ( + msg, + reader +) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + 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.bet.protobuf.rpc.Error.prototype.serializeBinary = function () { + var writer = new jspb.BinaryWriter(); + proto.bet.protobuf.rpc.Error.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.protobuf.rpc.Error} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.protobuf.rpc.Error.serializeBinaryToWriter = function ( + message, + writer +) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt32(1, f); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString(2, f); + } + f = /** @type {!(string|Uint8Array)} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeBytes(3, f); + } +}; + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.bet.protobuf.rpc.Error.prototype.getCode = function () { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + +/** + * @param {number} value + * @return {!proto.bet.protobuf.rpc.Error} returns this + */ +proto.bet.protobuf.rpc.Error.prototype.setCode = function (value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + +/** + * optional string message = 2; + * @return {string} + */ +proto.bet.protobuf.rpc.Error.prototype.getMessage = function () { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + +/** + * @param {string} value + * @return {!proto.bet.protobuf.rpc.Error} returns this + */ +proto.bet.protobuf.rpc.Error.prototype.setMessage = function (value) { + return jspb.Message.setField(this, 2, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.protobuf.rpc.Error} returns this + */ +proto.bet.protobuf.rpc.Error.prototype.clearMessage = function () { + return jspb.Message.setField(this, 2, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.protobuf.rpc.Error.prototype.hasMessage = function () { + return jspb.Message.getField(this, 2) != null; +}; + +/** + * optional bytes data = 3; + * @return {!(string|Uint8Array)} + */ +proto.bet.protobuf.rpc.Error.prototype.getData = function () { + return /** @type {!(string|Uint8Array)} */ ( + jspb.Message.getFieldWithDefault(this, 3, "") + ); +}; + +/** + * optional bytes data = 3; + * This is a type-conversion wrapper around `getData()` + * @return {string} + */ +proto.bet.protobuf.rpc.Error.prototype.getData_asB64 = function () { + return /** @type {string} */ (jspb.Message.bytesAsB64(this.getData())); +}; + +/** + * optional bytes data = 3; + * 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.bet.protobuf.rpc.Error.prototype.getData_asU8 = function () { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8(this.getData())); +}; + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.bet.protobuf.rpc.Error} returns this + */ +proto.bet.protobuf.rpc.Error.prototype.setData = function (value) { + return jspb.Message.setField(this, 3, value); +}; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.protobuf.rpc.Error} returns this + */ +proto.bet.protobuf.rpc.Error.prototype.clearData = function () { + return jspb.Message.setField(this, 3, undefined); +}; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.protobuf.rpc.Error.prototype.hasData = function () { + return jspb.Message.getField(this, 3) != null; +}; + +goog.object.extend(exports, proto.bet.protobuf.rpc); diff --git a/src/app/modules/protobuf/ss/member/identity_pb.d.ts b/src/app/modules/protobuf/ss/member/identity_pb.d.ts new file mode 100644 index 0000000..817aa22 --- /dev/null +++ b/src/app/modules/protobuf/ss/member/identity_pb.d.ts @@ -0,0 +1,340 @@ +// package: bet.beteran.ss.member.identity +// file: ss/member/identity.proto + +import * as jspb from 'google-protobuf'; +import * as protobuf_rpc_error_pb from '../../protobuf/rpc/error_pb'; +import * as models_core_network_pb from '../../models/core/network_pb'; + +export class CheckUsernameForDuplicationRequest extends jspb.Message { + hasClient(): boolean; + clearClient(): void; + getClient(): models_core_network_pb.Client | undefined; + setClient(value?: models_core_network_pb.Client): void; + + getUsername(): string; + setUsername(value: string): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): CheckUsernameForDuplicationRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckUsernameForDuplicationRequest + ): CheckUsernameForDuplicationRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckUsernameForDuplicationRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckUsernameForDuplicationRequest; + static deserializeBinaryFromReader( + message: CheckUsernameForDuplicationRequest, + reader: jspb.BinaryReader + ): CheckUsernameForDuplicationRequest; +} + +export namespace CheckUsernameForDuplicationRequest { + export type AsObject = { + client?: models_core_network_pb.Client.AsObject; + username: string; + }; +} + +export class CheckUsernameForDuplicationResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasDuplicated(): boolean; + clearDuplicated(): void; + getDuplicated(): boolean; + setDuplicated(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): CheckUsernameForDuplicationResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckUsernameForDuplicationResponse + ): CheckUsernameForDuplicationResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckUsernameForDuplicationResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckUsernameForDuplicationResponse; + static deserializeBinaryFromReader( + message: CheckUsernameForDuplicationResponse, + reader: jspb.BinaryReader + ): CheckUsernameForDuplicationResponse; +} + +export namespace CheckUsernameForDuplicationResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + duplicated: boolean; + }; +} + +export class CheckNicknameForDuplicationRequest extends jspb.Message { + hasClient(): boolean; + clearClient(): void; + getClient(): models_core_network_pb.Client | undefined; + setClient(value?: models_core_network_pb.Client): void; + + getNickname(): string; + setNickname(value: string): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): CheckNicknameForDuplicationRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckNicknameForDuplicationRequest + ): CheckNicknameForDuplicationRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckNicknameForDuplicationRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckNicknameForDuplicationRequest; + static deserializeBinaryFromReader( + message: CheckNicknameForDuplicationRequest, + reader: jspb.BinaryReader + ): CheckNicknameForDuplicationRequest; +} + +export namespace CheckNicknameForDuplicationRequest { + export type AsObject = { + client?: models_core_network_pb.Client.AsObject; + nickname: string; + }; +} + +export class CheckNicknameForDuplicationResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasDuplicated(): boolean; + clearDuplicated(): void; + getDuplicated(): boolean; + setDuplicated(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): CheckNicknameForDuplicationResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckNicknameForDuplicationResponse + ): CheckNicknameForDuplicationResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckNicknameForDuplicationResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckNicknameForDuplicationResponse; + static deserializeBinaryFromReader( + message: CheckNicknameForDuplicationResponse, + reader: jspb.BinaryReader + ): CheckNicknameForDuplicationResponse; +} + +export namespace CheckNicknameForDuplicationResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + duplicated: boolean; + }; +} + +export class CaptchaRequest extends jspb.Message { + hasClient(): boolean; + clearClient(): void; + getClient(): models_core_network_pb.Client | undefined; + setClient(value?: models_core_network_pb.Client): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CaptchaRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CaptchaRequest + ): CaptchaRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CaptchaRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): CaptchaRequest; + static deserializeBinaryFromReader( + message: CaptchaRequest, + reader: jspb.BinaryReader + ): CaptchaRequest; +} + +export namespace CaptchaRequest { + export type AsObject = { + client?: models_core_network_pb.Client.AsObject; + }; +} + +export class CaptchaResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasToken(): boolean; + clearToken(): void; + getToken(): string; + setToken(value: string): void; + + hasImage(): boolean; + clearImage(): void; + getImage(): string; + setImage(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CaptchaResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: CaptchaResponse + ): CaptchaResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CaptchaResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): CaptchaResponse; + static deserializeBinaryFromReader( + message: CaptchaResponse, + reader: jspb.BinaryReader + ): CaptchaResponse; +} + +export namespace CaptchaResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + token: string; + image: string; + }; +} + +export class SigninRequest extends jspb.Message { + hasClient(): boolean; + clearClient(): void; + getClient(): models_core_network_pb.Client | undefined; + setClient(value?: models_core_network_pb.Client): void; + + getToken(): string; + setToken(value: string): void; + + getSecurityCode(): string; + setSecurityCode(value: string): void; + + getUsername(): string; + setUsername(value: string): void; + + getPassword(): string; + setPassword(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigninRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninRequest + ): SigninRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): SigninRequest; + static deserializeBinaryFromReader( + message: SigninRequest, + reader: jspb.BinaryReader + ): SigninRequest; +} + +export namespace SigninRequest { + export type AsObject = { + client?: models_core_network_pb.Client.AsObject; + token: string; + securityCode: string; + username: string; + password: string; + }; +} + +export class SigninResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_error_pb.Error | undefined; + setError(value?: protobuf_rpc_error_pb.Error): void; + + hasToken(): boolean; + clearToken(): void; + getToken(): string; + setToken(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): SigninResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninResponse + ): SigninResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): SigninResponse; + static deserializeBinaryFromReader( + message: SigninResponse, + reader: jspb.BinaryReader + ): SigninResponse; +} + +export namespace SigninResponse { + export type AsObject = { + error?: protobuf_rpc_error_pb.Error.AsObject; + token: string; + }; +} diff --git a/src/app/modules/protobuf/ss/member/identity_pb.js b/src/app/modules/protobuf/ss/member/identity_pb.js new file mode 100644 index 0000000..39d826a --- /dev/null +++ b/src/app/modules/protobuf/ss/member/identity_pb.js @@ -0,0 +1,1999 @@ +// source: ss/member/identity.proto +/** + * @fileoverview + * @enhanceable + * @suppress {missingRequire} reports error on implicit type usages. + * @suppress {messageConventions} JS Compiler reports an error if a variable or + * field starts with 'MSG_' and isn't a translatable message. + * @public + */ +// GENERATED CODE -- DO NOT EDIT! +/* eslint-disable */ +// @ts-nocheck + +var jspb = require("google-protobuf"); +var goog = jspb; +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); + +var protobuf_rpc_error_pb = require("../../protobuf/rpc/error_pb.js"); +goog.object.extend(proto, protobuf_rpc_error_pb); +var models_core_network_pb = require("../../models/core/network_pb.js"); +goog.object.extend(proto, models_core_network_pb); +goog.exportSymbol( + "proto.bet.beteran.ss.member.identity.CaptchaRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.ss.member.identity.CaptchaResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.ss.member.identity.SigninRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.ss.member.identity.SigninResponse", + 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.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.displayName = + "proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest"; +} +/** + * 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.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.displayName = + "proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse"; +} +/** + * 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.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.displayName = + "proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest"; +} +/** + * 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.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.displayName = + "proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse"; +} +/** + * 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.bet.beteran.ss.member.identity.CaptchaRequest = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.ss.member.identity.CaptchaRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.ss.member.identity.CaptchaRequest.displayName = + "proto.bet.beteran.ss.member.identity.CaptchaRequest"; +} +/** + * 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.bet.beteran.ss.member.identity.CaptchaResponse = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.ss.member.identity.CaptchaResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.ss.member.identity.CaptchaResponse.displayName = + "proto.bet.beteran.ss.member.identity.CaptchaResponse"; +} +/** + * 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.bet.beteran.ss.member.identity.SigninRequest = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.bet.beteran.ss.member.identity.SigninRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.ss.member.identity.SigninRequest.displayName = + "proto.bet.beteran.ss.member.identity.SigninRequest"; +} +/** + * 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.bet.beteran.ss.member.identity.SigninResponse = function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.ss.member.identity.SigninResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.ss.member.identity.SigninResponse.displayName = + "proto.bet.beteran.ss.member.identity.SigninResponse"; +} + +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.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.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.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.toObject = + function (includeInstance, msg) { + var f, + obj = { + client: + (f = msg.getClient()) && + models_core_network_pb.Client.toObject(includeInstance, f), + username: jspb.Message.getFieldWithDefault(msg, 2, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest(); + return proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new models_core_network_pb.Client(); + reader.readMessage( + value, + models_core_network_pb.Client.deserializeBinaryFromReader + ); + msg.setClient(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getClient(); + if (f != null) { + writer.writeMessage( + 1, + f, + models_core_network_pb.Client.serializeBinaryToWriter + ); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(2, f); + } + }; + +/** + * optional bet.beteran.core.network.Client client = 1; + * @return {?proto.bet.beteran.core.network.Client} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.prototype.getClient = + function () { + return /** @type{?proto.bet.beteran.core.network.Client} */ ( + jspb.Message.getWrapperField(this, models_core_network_pb.Client, 1) + ); + }; + +/** + * @param {?proto.bet.beteran.core.network.Client|undefined} value + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest} returns this + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.prototype.setClient = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest} returns this + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.prototype.clearClient = + function () { + return this.setClient(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.prototype.hasClient = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional string username = 2; + * @return {string} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.prototype.getUsername = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest} returns this + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationRequest.prototype.setUsername = + function (value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.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.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.toObject = + function (includeInstance, msg) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse(); + return proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDuplicated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool(2, f); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional bool duplicated = 2; + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.getDuplicated = + function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 2, false) + ); + }; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.setDuplicated = + function (value) { + return jspb.Message.setField(this, 2, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.clearDuplicated = + function () { + return jspb.Message.setField(this, 2, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CheckUsernameForDuplicationResponse.prototype.hasDuplicated = + 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.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.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.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.toObject = + function (includeInstance, msg) { + var f, + obj = { + client: + (f = msg.getClient()) && + models_core_network_pb.Client.toObject(includeInstance, f), + nickname: jspb.Message.getFieldWithDefault(msg, 2, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest(); + return proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new models_core_network_pb.Client(); + reader.readMessage( + value, + models_core_network_pb.Client.deserializeBinaryFromReader + ); + msg.setClient(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setNickname(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getClient(); + if (f != null) { + writer.writeMessage( + 1, + f, + models_core_network_pb.Client.serializeBinaryToWriter + ); + } + f = message.getNickname(); + if (f.length > 0) { + writer.writeString(2, f); + } + }; + +/** + * optional bet.beteran.core.network.Client client = 1; + * @return {?proto.bet.beteran.core.network.Client} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.prototype.getClient = + function () { + return /** @type{?proto.bet.beteran.core.network.Client} */ ( + jspb.Message.getWrapperField(this, models_core_network_pb.Client, 1) + ); + }; + +/** + * @param {?proto.bet.beteran.core.network.Client|undefined} value + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest} returns this + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.prototype.setClient = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest} returns this + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.prototype.clearClient = + function () { + return this.setClient(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.prototype.hasClient = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional string nickname = 2; + * @return {string} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.prototype.getNickname = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest} returns this + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationRequest.prototype.setNickname = + function (value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.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.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.toObject = + function (includeInstance, msg) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse(); + return proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setDuplicated(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool(2, f); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional bool duplicated = 2; + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.getDuplicated = + function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 2, false) + ); + }; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.setDuplicated = + function (value) { + return jspb.Message.setField(this, 2, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.clearDuplicated = + function () { + return jspb.Message.setField(this, 2, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CheckNicknameForDuplicationResponse.prototype.hasDuplicated = + 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.bet.beteran.ss.member.identity.CaptchaRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.ss.member.identity.CaptchaRequest.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.bet.beteran.ss.member.identity.CaptchaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.ss.member.identity.CaptchaRequest.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + client: + (f = msg.getClient()) && + models_core_network_pb.Client.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.bet.beteran.ss.member.identity.CaptchaRequest} + */ +proto.bet.beteran.ss.member.identity.CaptchaRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.ss.member.identity.CaptchaRequest(); + return proto.bet.beteran.ss.member.identity.CaptchaRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.ss.member.identity.CaptchaRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.ss.member.identity.CaptchaRequest} + */ +proto.bet.beteran.ss.member.identity.CaptchaRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new models_core_network_pb.Client(); + reader.readMessage( + value, + models_core_network_pb.Client.deserializeBinaryFromReader + ); + msg.setClient(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.ss.member.identity.CaptchaRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.ss.member.identity.CaptchaRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.ss.member.identity.CaptchaRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.ss.member.identity.CaptchaRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getClient(); + if (f != null) { + writer.writeMessage( + 1, + f, + models_core_network_pb.Client.serializeBinaryToWriter + ); + } + }; + +/** + * optional bet.beteran.core.network.Client client = 1; + * @return {?proto.bet.beteran.core.network.Client} + */ +proto.bet.beteran.ss.member.identity.CaptchaRequest.prototype.getClient = + function () { + return /** @type{?proto.bet.beteran.core.network.Client} */ ( + jspb.Message.getWrapperField(this, models_core_network_pb.Client, 1) + ); + }; + +/** + * @param {?proto.bet.beteran.core.network.Client|undefined} value + * @return {!proto.bet.beteran.ss.member.identity.CaptchaRequest} returns this + */ +proto.bet.beteran.ss.member.identity.CaptchaRequest.prototype.setClient = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CaptchaRequest} returns this + */ +proto.bet.beteran.ss.member.identity.CaptchaRequest.prototype.clearClient = + function () { + return this.setClient(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CaptchaRequest.prototype.hasClient = + 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.bet.beteran.ss.member.identity.CaptchaResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.ss.member.identity.CaptchaResponse.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.bet.beteran.ss.member.identity.CaptchaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.ss.member.identity.CaptchaResponse.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + token: jspb.Message.getFieldWithDefault(msg, 2, ""), + image: 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.bet.beteran.ss.member.identity.CaptchaResponse} + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.ss.member.identity.CaptchaResponse(); + return proto.bet.beteran.ss.member.identity.CaptchaResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.ss.member.identity.CaptchaResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.ss.member.identity.CaptchaResponse} + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToken(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setImage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.ss.member.identity.CaptchaResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.ss.member.identity.CaptchaResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString(2, f); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeString(3, f); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.ss.member.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional string token = 2; + * @return {string} + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.getToken = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.ss.member.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.setToken = + function (value) { + return jspb.Message.setField(this, 2, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.clearToken = + function () { + return jspb.Message.setField(this, 2, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.hasToken = + function () { + return jspb.Message.getField(this, 2) != null; + }; + +/** + * optional string image = 3; + * @return {string} + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.getImage = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.ss.member.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.setImage = + function (value) { + return jspb.Message.setField(this, 3, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.CaptchaResponse} returns this + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.clearImage = + function () { + return jspb.Message.setField(this, 3, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.CaptchaResponse.prototype.hasImage = + 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.bet.beteran.ss.member.identity.SigninRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.ss.member.identity.SigninRequest.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.bet.beteran.ss.member.identity.SigninRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.ss.member.identity.SigninRequest.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + client: + (f = msg.getClient()) && + models_core_network_pb.Client.toObject(includeInstance, f), + token: jspb.Message.getFieldWithDefault(msg, 2, ""), + securityCode: jspb.Message.getFieldWithDefault(msg, 3, ""), + username: jspb.Message.getFieldWithDefault(msg, 4, ""), + password: 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.bet.beteran.ss.member.identity.SigninRequest} + */ +proto.bet.beteran.ss.member.identity.SigninRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.ss.member.identity.SigninRequest(); + return proto.bet.beteran.ss.member.identity.SigninRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.ss.member.identity.SigninRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.ss.member.identity.SigninRequest} + */ +proto.bet.beteran.ss.member.identity.SigninRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new models_core_network_pb.Client(); + reader.readMessage( + value, + models_core_network_pb.Client.deserializeBinaryFromReader + ); + msg.setClient(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setToken(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSecurityCode(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.ss.member.identity.SigninRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.ss.member.identity.SigninRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.ss.member.identity.SigninRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getClient(); + if (f != null) { + writer.writeMessage( + 1, + f, + models_core_network_pb.Client.serializeBinaryToWriter + ); + } + f = message.getToken(); + if (f.length > 0) { + writer.writeString(2, f); + } + f = message.getSecurityCode(); + if (f.length > 0) { + writer.writeString(3, f); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(4, f); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString(5, f); + } + }; + +/** + * optional bet.beteran.core.network.Client client = 1; + * @return {?proto.bet.beteran.core.network.Client} + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.getClient = + function () { + return /** @type{?proto.bet.beteran.core.network.Client} */ ( + jspb.Message.getWrapperField(this, models_core_network_pb.Client, 1) + ); + }; + +/** + * @param {?proto.bet.beteran.core.network.Client|undefined} value + * @return {!proto.bet.beteran.ss.member.identity.SigninRequest} returns this + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.setClient = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.SigninRequest} returns this + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.clearClient = + function () { + return this.setClient(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.hasClient = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional string token = 2; + * @return {string} + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.getToken = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.ss.member.identity.SigninRequest} returns this + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.setToken = + function (value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + +/** + * optional string security_code = 3; + * @return {string} + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.getSecurityCode = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.ss.member.identity.SigninRequest} returns this + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.setSecurityCode = + function (value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + +/** + * optional string username = 4; + * @return {string} + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.getUsername = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.ss.member.identity.SigninRequest} returns this + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.setUsername = + function (value) { + return jspb.Message.setProto3StringField(this, 4, value); + }; + +/** + * optional string password = 5; + * @return {string} + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.getPassword = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 5, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.ss.member.identity.SigninRequest} returns this + */ +proto.bet.beteran.ss.member.identity.SigninRequest.prototype.setPassword = + 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.bet.beteran.ss.member.identity.SigninResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.ss.member.identity.SigninResponse.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.bet.beteran.ss.member.identity.SigninResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.ss.member.identity.SigninResponse.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_error_pb.Error.toObject(includeInstance, f), + token: jspb.Message.getFieldWithDefault(msg, 2, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.bet.beteran.ss.member.identity.SigninResponse} + */ +proto.bet.beteran.ss.member.identity.SigninResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.ss.member.identity.SigninResponse(); + return proto.bet.beteran.ss.member.identity.SigninResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.ss.member.identity.SigninResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.ss.member.identity.SigninResponse} + */ +proto.bet.beteran.ss.member.identity.SigninResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_error_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_error_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + 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.bet.beteran.ss.member.identity.SigninResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.ss.member.identity.SigninResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.bet.beteran.ss.member.identity.SigninResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.ss.member.identity.SigninResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage( + 1, + f, + protobuf_rpc_error_pb.Error.serializeBinaryToWriter + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeString(2, f); + } + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.ss.member.identity.SigninResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_error_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.ss.member.identity.SigninResponse} returns this + */ +proto.bet.beteran.ss.member.identity.SigninResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.SigninResponse} returns this + */ +proto.bet.beteran.ss.member.identity.SigninResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.SigninResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional string token = 2; + * @return {string} + */ +proto.bet.beteran.ss.member.identity.SigninResponse.prototype.getToken = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.ss.member.identity.SigninResponse} returns this + */ +proto.bet.beteran.ss.member.identity.SigninResponse.prototype.setToken = + function (value) { + return jspb.Message.setField(this, 2, value); + }; + +/** + * Clears the field making it undefined. + * @return {!proto.bet.beteran.ss.member.identity.SigninResponse} returns this + */ +proto.bet.beteran.ss.member.identity.SigninResponse.prototype.clearToken = + function () { + return jspb.Message.setField(this, 2, undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.ss.member.identity.SigninResponse.prototype.hasToken = + function () { + return jspb.Message.getField(this, 2) != null; + }; + +goog.object.extend(exports, proto.bet.beteran.ss.member.identity);