From 33838a3b905fb0e000fc0e1433def74f79904b74 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Wed, 3 Aug 2022 10:46:16 +0000 Subject: [PATCH] server integration is implemented --- src/app/app.module.ts | 26 +- src/app/core/nats/config/module-config.ts | 5 + src/app/core/nats/config/token.ts | 5 + src/app/core/nats/nats.module.ts | 40 +- src/app/core/nats/services/index.ts | 5 + src/app/core/nats/services/nats.service.ts | 107 + src/app/core/nats/token.ts | 6 - .../member/user/components/list.component.ts | 5 +- .../member/services/identity.service.ts | 35 +- .../protobuf/c2se/backend/identity_pb.d.ts | 46 +- .../protobuf/c2se/backend/identity_pb.js | 236 +- .../protobuf/c2se/backend/member_pb.d.ts | 126 +- .../protobuf/c2se/backend/member_pb.js | 795 ++++++- .../protobuf/c2se/common/identity_pb.d.ts | 124 +- .../protobuf/c2se/common/identity_pb.js | 747 +++++- .../protobuf/c2se/core/network_pb.d.ts | 2 + .../modules/protobuf/c2se/core/network_pb.js | 9 + .../protobuf/c2se/frontend/identity_pb.d.ts | 46 +- .../protobuf/c2se/frontend/identity_pb.js | 236 +- .../protobuf/ss/member/identity_pb.d.ts | 340 --- .../modules/protobuf/ss/member/identity_pb.js | 1999 ----------------- src/environments/environment.prod.ts | 9 +- src/environments/environment.ts | 9 +- src/environments/environment.type.ts | 8 + 24 files changed, 2319 insertions(+), 2647 deletions(-) create mode 100644 src/app/core/nats/config/module-config.ts create mode 100644 src/app/core/nats/config/token.ts create mode 100644 src/app/core/nats/services/index.ts create mode 100644 src/app/core/nats/services/nats.service.ts delete mode 100644 src/app/core/nats/token.ts delete mode 100644 src/app/modules/protobuf/ss/member/identity_pb.d.ts delete mode 100644 src/app/modules/protobuf/ss/member/identity_pb.js create mode 100644 src/environments/environment.type.ts diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 457cc77..cc1acfa 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -5,7 +5,6 @@ import { ExtraOptions, PreloadAllModules, RouterModule } from '@angular/router'; import { MatIconRegistry, MatIconModule } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; import { MarkdownModule } from 'ngx-markdown'; -import * as nats from 'nats.ws'; import { FuseModule } from '@fuse'; import { FuseConfigModule } from '@fuse/services/config'; @@ -16,7 +15,11 @@ import { mockApiServices } from 'app/mock-api'; import { LayoutModule } from 'app/layout/layout.module'; import { AppComponent } from 'app/app.component'; import { appRoutes } from 'app/app.routing'; -import { NATS_CONNECTION } from 'app/core/nats/token'; + +import { NatsModule } from 'app/core/nats/nats.module'; + +import { environment } from 'environments/environment'; + import { MemberModule } from 'app/modules/polyglot/member/member.module'; const routerConfig: ExtraOptions = { @@ -24,22 +27,6 @@ const routerConfig: ExtraOptions = { scrollPositionRestoration: 'enabled', }; -const natsConnection = () => { - return new Promise((resolve, reject) => { - nats - .connect({ - servers: ['ws://192.168.50.200:8088'], - }) - .then((conn) => { - console.log('NATS connected', conn.info); - resolve(conn); - }) - .catch((e) => { - reject(e); - }); - }); -}; - @NgModule({ declarations: [AppComponent], imports: [ @@ -62,9 +49,10 @@ const natsConnection = () => { MarkdownModule.forRoot({}), MatIconModule, + NatsModule.forRoot(environment.nats), + MemberModule.forRoot(), ], - providers: [{ provide: NATS_CONNECTION, useFactory: natsConnection }], bootstrap: [AppComponent], }) export class AppModule { diff --git a/src/app/core/nats/config/module-config.ts b/src/app/core/nats/config/module-config.ts new file mode 100644 index 0000000..03619d9 --- /dev/null +++ b/src/app/core/nats/config/module-config.ts @@ -0,0 +1,5 @@ +import * as nats from 'nats.ws'; + +export interface ModuleConfig { + connectionOptions: nats.ConnectionOptions; +} diff --git a/src/app/core/nats/config/token.ts b/src/app/core/nats/config/token.ts new file mode 100644 index 0000000..a8702aa --- /dev/null +++ b/src/app/core/nats/config/token.ts @@ -0,0 +1,5 @@ +import { InjectionToken } from '@angular/core'; + +export const _MODULE_CONFIG = new InjectionToken( + '@bet/beteran nats config of module' +); diff --git a/src/app/core/nats/nats.module.ts b/src/app/core/nats/nats.module.ts index 25f9537..b3583a7 100644 --- a/src/app/core/nats/nats.module.ts +++ b/src/app/core/nats/nats.module.ts @@ -1,7 +1,35 @@ -import { NgModule } from '@angular/core'; +import { APP_INITIALIZER, ModuleWithProviders, NgModule } from '@angular/core'; +import { ModuleConfig } from './config/module-config'; +import { _MODULE_CONFIG } from './config/token'; -@NgModule({ - exports: [], - providers: [], -}) -export class NatsCoreModule {} +import { SERVICES } from './services'; +import { NatsService } from './services/nats.service'; + +@NgModule({}) +export class NatsRootModule {} + +@NgModule({}) +export class NatsModule { + public static forRoot( + config: ModuleConfig + ): ModuleWithProviders { + return { + ngModule: NatsRootModule, + providers: [ + { provide: _MODULE_CONFIG, useValue: config }, + { + // Preload the default language before the app starts to prevent empty/jumping content + provide: APP_INITIALIZER, + deps: [NatsService], + useFactory: + (natsService: NatsService): any => + (): Promise => { + return natsService.connect(); + }, + multi: true, + }, + ...SERVICES, + ], + }; + } +} diff --git a/src/app/core/nats/services/index.ts b/src/app/core/nats/services/index.ts new file mode 100644 index 0000000..820b3a5 --- /dev/null +++ b/src/app/core/nats/services/index.ts @@ -0,0 +1,5 @@ +import { Type } from '@angular/core'; + +import { NatsService } from './nats.service'; + +export const SERVICES: Type[] = [NatsService]; diff --git a/src/app/core/nats/services/nats.service.ts b/src/app/core/nats/services/nats.service.ts new file mode 100644 index 0000000..149e971 --- /dev/null +++ b/src/app/core/nats/services/nats.service.ts @@ -0,0 +1,107 @@ +import { Inject, Injectable, Type } from '@angular/core'; + +import * as jspb from 'google-protobuf'; +import * as nats from 'nats.ws'; + +import { HEADER_CLIENT } from 'app/modules/protobuf/c2se/core/network_pb'; +import { Client } from 'app/modules/protobuf/models/core/network_pb'; + +import { ModuleConfig } from '../config/module-config'; +import { _MODULE_CONFIG } from '../config/token'; + +type DeserializeConstructor = { + new (): T; + deserializeBinary(this: DeserializeConstructor, bytes: Uint8Array): T; +}; + +const NAME_GET_ERROR = 'getError'; +const NAME_GET_RESULT = 'getResult'; + +@Injectable({ + providedIn: 'root', +}) +export class NatsService { + private __conn?: nats.NatsConnection; + + /** + * Constructor + */ + constructor(@Inject(_MODULE_CONFIG) private __config: ModuleConfig) {} + + // ----------------------------------------------------------------------------------------------------- + // @ Accessors + // ----------------------------------------------------------------------------------------------------- + get connection(): nats.NatsConnection | undefined { + return this.__conn; + } + + // ----------------------------------------------------------------------------------------------------- + // @ Public methods + // ----------------------------------------------------------------------------------------------------- + + connect(): Promise { + return new Promise((resolve, reject) => { + if (!!this.__conn) { + return resolve(); + } + nats + .connect(this.__config.connectionOptions) + .then((conn) => { + console.log('NATS connected', conn.info?.client_ip); + this.__conn = conn; + resolve(); + }) + .catch((e) => { + reject(e); + }); + }); + } + + request( + subject: string, + req: Uint8Array, + deserialize: (data: Uint8Array) => any, + opts?: nats.RequestOptions | undefined + ): Promise { + return new Promise((resolve, reject) => { + let c = new Client(); + c.setClientIp(this.__conn?.info?.client_ip + ''); + c.setSessionId(''); + c.setSiteUrl(''); + + let _opts: nats.RequestOptions = !!opts ? opts : { timeout: 3000 }; + if (!_opts.headers) { + _opts.headers = nats.headers(); + } + + var decoder = new TextDecoder('utf8'); + _opts.headers.append( + HEADER_CLIENT, + btoa(decoder.decode(c.serializeBinary())) + ); + + this.__conn?.request(subject, req, _opts).then((msg) => { + let res = deserialize(msg.data); + + let get_error = (res as any)[NAME_GET_ERROR]; + if (!!get_error) { + let error = get_error.call(res); + if (!!error) { + return reject(error); + } + } + + let get_result = (res as any)[NAME_GET_RESULT]; + if (!!get_result) { + let result = get_result.call(res); + if (!result) { + return reject('result is not exist'); + } + return resolve(result); + } + + return reject('protocol error'); + }); + }); + } +} diff --git a/src/app/core/nats/token.ts b/src/app/core/nats/token.ts deleted file mode 100644 index 9a2abaa..0000000 --- a/src/app/core/nats/token.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { InjectionToken } from '@angular/core'; -import * as nats from 'nats.ws'; - -export const NATS_CONNECTION = new InjectionToken( - '@bet nats connection' -); diff --git a/src/app/modules/admin/member/user/components/list.component.ts b/src/app/modules/admin/member/user/components/list.component.ts index ab6c8b1..d7f770a 100644 --- a/src/app/modules/admin/member/user/components/list.component.ts +++ b/src/app/modules/admin/member/user/components/list.component.ts @@ -198,7 +198,10 @@ export class ListComponent implements OnInit, AfterViewInit, OnDestroy { __onClickSearch(): void { this.__isSearchOpened = !this.__isSearchOpened; - console.log('kkkk', this._identityService.getClientIp()); + console.log( + 'kkkk', + this._identityService.checkUsernameForDuplication('sdfsdfsdfsf') + ); } /** diff --git a/src/app/modules/polyglot/member/services/identity.service.ts b/src/app/modules/polyglot/member/services/identity.service.ts index f09d532..158bc12 100644 --- a/src/app/modules/polyglot/member/services/identity.service.ts +++ b/src/app/modules/polyglot/member/services/identity.service.ts @@ -1,8 +1,13 @@ -import { Inject, Injectable } from '@angular/core'; -import { NATS_CONNECTION } from 'app/core/nats/token'; - +import { Injectable } from '@angular/core'; +import { NatsService } from 'app/core/nats/services/nats.service'; import * as nats from 'nats.ws'; +import { + CheckUsernameForDuplicationRequest, + CheckUsernameForDuplicationResponse, +} from 'app/modules/protobuf/c2se/common/identity_pb'; +import { SUBJECT_CHECK_USERNAME_FOR_DUPLICATION } from 'app/modules/protobuf/c2se/backend/identity_pb'; + @Injectable({ providedIn: 'root', }) @@ -10,9 +15,7 @@ export class IdentityService { /** * Constructor */ - constructor( - @Inject(NATS_CONNECTION) private __nats_connection: nats.NatsConnection - ) {} + constructor(private __natsService: NatsService) {} // ----------------------------------------------------------------------------------------------------- // @ Accessors @@ -22,7 +25,23 @@ export class IdentityService { // @ Public methods // ----------------------------------------------------------------------------------------------------- - getClientIp(): number | undefined { - return this.__nats_connection.info?.client_id; + checkUsernameForDuplication(username: string): Promise { + return new Promise((resolve, reject) => { + let req = new CheckUsernameForDuplicationRequest(); + req.setUsername(username); + + this.__natsService + .request( + SUBJECT_CHECK_USERNAME_FOR_DUPLICATION, + req.serializeBinary(), + CheckUsernameForDuplicationResponse.deserializeBinary + ) + .then((result) => { + console.log('success', result, result.getDuplicated()); + }) + .catch((e) => { + console.log('failed', e); + }); + }); } } diff --git a/src/app/modules/protobuf/c2se/backend/identity_pb.d.ts b/src/app/modules/protobuf/c2se/backend/identity_pb.d.ts index 149ff1d..aba7a31 100644 --- a/src/app/modules/protobuf/c2se/backend/identity_pb.d.ts +++ b/src/app/modules/protobuf/c2se/backend/identity_pb.d.ts @@ -4,6 +4,14 @@ import * as jspb from 'google-protobuf'; import * as protobuf_rpc_error_pb from '../../protobuf/rpc/error_pb'; +export const SUBJECT_CHECK_USERNAME_FOR_DUPLICATION: string; + +export const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: string; + +export const SUBJECT_CAPTCHA: string; + +export const SUBJECT_SIGNIN: string; + export class SigninRequest extends jspb.Message { getToken(): string; setToken(value: string): void; @@ -53,10 +61,10 @@ export class SigninResponse extends jspb.Message { 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; + hasResult(): boolean; + clearResult(): void; + getResult(): SigninResponse.Result | undefined; + setResult(value?: SigninResponse.Result): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SigninResponse.AsObject; @@ -82,6 +90,34 @@ export class SigninResponse extends jspb.Message { export namespace SigninResponse { export type AsObject = { error?: protobuf_rpc_error_pb.Error.AsObject; - sessionId: string; + result?: SigninResponse.Result.AsObject; }; + + export class Result extends jspb.Message { + getSessionId(): string; + setSessionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Result, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; + } + + export namespace Result { + export type 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 index 42d4e71..c4a02d1 100644 --- a/src/app/modules/protobuf/c2se/backend/identity_pb.js +++ b/src/app/modules/protobuf/c2se/backend/identity_pb.js @@ -29,6 +29,24 @@ goog.exportSymbol( null, global ); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.identity.SigninResponse.Result", + null, + global +); + +proto.bet.beteran.c2se.backend.identity.SUBJECT_CHECK_USERNAME_FOR_DUPLICATION = + "bet.beteran.c2se.backend.identity.CheckUsernameForDuplication"; + +proto.bet.beteran.c2se.backend.identity.SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION = + "bet.beteran.c2se.backend.identity.CheckNicknameForDuplication"; + +proto.bet.beteran.c2se.backend.identity.SUBJECT_CAPTCHA = + "bet.beteran.c2se.backend.identity.Captcha"; + +proto.bet.beteran.c2se.backend.identity.SUBJECT_SIGNIN = + "bet.beteran.c2se.backend.identity.Signin"; + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -79,6 +97,33 @@ if (goog.DEBUG && !COMPILED) { proto.bet.beteran.c2se.backend.identity.SigninResponse.displayName = "proto.bet.beteran.c2se.backend.identity.SigninResponse"; } +/** + * 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.Result = function ( + opt_data +) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.identity.SigninResponse.Result, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.displayName = + "proto.bet.beteran.c2se.backend.identity.SigninResponse.Result"; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** @@ -344,7 +389,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) { error: (f = msg.getError()) && protobuf_rpc_error_pb.Error.toObject(includeInstance, f), - sessionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.toObject( + includeInstance, + f + ), }; if (includeInstance) { @@ -393,8 +443,14 @@ proto.bet.beteran.c2se.backend.identity.SigninResponse.deserializeBinaryFromRead msg.setError(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSessionId(value); + var value = + new proto.bet.beteran.c2se.backend.identity.SigninResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.backend.identity.SigninResponse.Result + .deserializeBinaryFromReader + ); + msg.setResult(value); break; default: reader.skipField(); @@ -436,12 +492,154 @@ proto.bet.beteran.c2se.backend.identity.SigninResponse.serializeBinaryToWriter = protobuf_rpc_error_pb.Error.serializeBinaryToWriter ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); + f = message.getResult(); if (f != null) { - writer.writeString(2, f); + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.backend.identity.SigninResponse.Result + .serializeBinaryToWriter + ); } }; +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.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.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.toObject = + function (includeInstance, msg) { + var f, + obj = { + sessionId: 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.identity.SigninResponse.Result} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.backend.identity.SigninResponse.Result(); + return proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse.Result} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.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.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.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.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.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getSessionId(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; + +/** + * optional string session_id = 1; + * @return {string} + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.prototype.getSessionId = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse.Result} returns this + */ +proto.bet.beteran.c2se.backend.identity.SigninResponse.Result.prototype.setSessionId = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + /** * optional bet.protobuf.rpc.Error error = 1; * @return {?proto.bet.protobuf.rpc.Error} @@ -481,39 +679,43 @@ proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.hasError = }; /** - * optional string session_id = 2; - * @return {string} + * optional Result result = 2; + * @return {?proto.bet.beteran.c2se.backend.identity.SigninResponse.Result} */ -proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.getSessionId = +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.getResult = function () { - return /** @type {string} */ ( - jspb.Message.getFieldWithDefault(this, 2, "") + return /** @type{?proto.bet.beteran.c2se.backend.identity.SigninResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.backend.identity.SigninResponse.Result, + 2 + ) ); }; /** - * @param {string} value + * @param {?proto.bet.beteran.c2se.backend.identity.SigninResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.backend.identity.SigninResponse} returns this */ -proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.setSessionId = +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.setResult = function (value) { - return jspb.Message.setField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** - * Clears the field making it undefined. + * 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.clearSessionId = +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.clearResult = function () { - return jspb.Message.setField(this, 2, undefined); + return this.setResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.hasSessionId = +proto.bet.beteran.c2se.backend.identity.SigninResponse.prototype.hasResult = function () { return jspb.Message.getField(this, 2) != null; }; diff --git a/src/app/modules/protobuf/c2se/backend/member_pb.d.ts b/src/app/modules/protobuf/c2se/backend/member_pb.d.ts index 2b8b1af..14b9021 100644 --- a/src/app/modules/protobuf/c2se/backend/member_pb.d.ts +++ b/src/app/modules/protobuf/c2se/backend/member_pb.d.ts @@ -65,13 +65,10 @@ export class ListMembersResponse extends jspb.Message { 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; + hasResult(): boolean; + clearResult(): void; + getResult(): ListMembersResponse.Result | undefined; + setResult(value?: ListMembersResponse.Result): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListMembersResponse.AsObject; @@ -97,8 +94,41 @@ export class ListMembersResponse extends jspb.Message { export namespace ListMembersResponse { export type AsObject = { error?: protobuf_rpc_error_pb.Error.AsObject; - membersList: Array; + result?: ListMembersResponse.Result.AsObject; }; + + export class Result extends jspb.Message { + 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): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Result, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; + } + + export namespace Result { + export type AsObject = { + membersList: Array; + }; + } } export class GetMemberRequest extends jspb.Message { @@ -138,10 +168,10 @@ export class GetMemberResponse extends jspb.Message { 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; + hasResult(): boolean; + clearResult(): void; + getResult(): GetMemberResponse.Result | undefined; + setResult(value?: GetMemberResponse.Result): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetMemberResponse.AsObject; @@ -167,8 +197,38 @@ export class GetMemberResponse extends jspb.Message { export namespace GetMemberResponse { export type AsObject = { error?: protobuf_rpc_error_pb.Error.AsObject; - member?: models_member_member_pb.Member.AsObject; + result?: GetMemberResponse.Result.AsObject; }; + + export class Result extends jspb.Message { + hasMember(): boolean; + clearMember(): void; + getMember(): models_member_member_pb.Member | undefined; + setMember(value?: models_member_member_pb.Member): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Result, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; + } + + export namespace Result { + export type AsObject = { + member?: models_member_member_pb.Member.AsObject; + }; + } } export class GetMemberByUsernameRequest extends jspb.Message { @@ -208,10 +268,10 @@ export class GetMemberByUsernameResponse extends jspb.Message { 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; + hasResult(): boolean; + clearResult(): void; + getResult(): GetMemberByUsernameResponse.Result | undefined; + setResult(value?: GetMemberByUsernameResponse.Result): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetMemberByUsernameResponse.AsObject; @@ -237,6 +297,36 @@ export class GetMemberByUsernameResponse extends jspb.Message { export namespace GetMemberByUsernameResponse { export type AsObject = { error?: protobuf_rpc_error_pb.Error.AsObject; - member?: models_member_member_pb.Member.AsObject; + result?: GetMemberByUsernameResponse.Result.AsObject; }; + + export class Result extends jspb.Message { + hasMember(): boolean; + clearMember(): void; + getMember(): models_member_member_pb.Member | undefined; + setMember(value?: models_member_member_pb.Member): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Result, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; + } + + export namespace Result { + export type 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 index de7a8b7..4a07652 100644 --- a/src/app/modules/protobuf/c2se/backend/member_pb.js +++ b/src/app/modules/protobuf/c2se/backend/member_pb.js @@ -37,6 +37,11 @@ goog.exportSymbol( null, global ); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result", + null, + global +); goog.exportSymbol( "proto.bet.beteran.c2se.backend.member.GetMemberRequest", null, @@ -47,6 +52,11 @@ goog.exportSymbol( null, global ); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result", + null, + global +); goog.exportSymbol( "proto.bet.beteran.c2se.backend.member.ListMembersRequest", null, @@ -57,6 +67,11 @@ goog.exportSymbol( null, global ); +goog.exportSymbol( + "proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result", + null, + global +); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -102,14 +117,7 @@ if (goog.DEBUG && !COMPILED) { 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 - ); + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits( proto.bet.beteran.c2se.backend.member.ListMembersResponse, @@ -123,6 +131,41 @@ if (goog.DEBUG && !COMPILED) { 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.ListMembersResponse.Result = function ( + opt_data +) { + jspb.Message.initialize( + this, + opt_data, + 0, + -1, + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result + .repeatedFields_, + null + ); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.displayName = + "proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result"; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -173,6 +216,33 @@ if (goog.DEBUG && !COMPILED) { 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.GetMemberResponse.Result = function ( + opt_data +) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.displayName = + "proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result"; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -227,6 +297,32 @@ if (goog.DEBUG && !COMPILED) { proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.displayName = "proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse"; } +/** + * 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.Result = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.displayName = + "proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result"; +} /** * List of repeated fields within this message type. @@ -551,13 +647,6 @@ proto.bet.beteran.c2se.backend.member.ListMembersRequest.prototype.clearSortsLis 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. @@ -595,11 +684,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) { 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 - ), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.toObject( + includeInstance, + f + ), }; if (includeInstance) { @@ -648,12 +738,14 @@ proto.bet.beteran.c2se.backend.member.ListMembersResponse.deserializeBinaryFromR msg.setError(value); break; case 2: - var value = new models_member_member_pb.Member(); + var value = + new proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result(); reader.readMessage( value, - models_member_member_pb.Member.deserializeBinaryFromReader + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result + .deserializeBinaryFromReader ); - msg.addMembers(value); + msg.setResult(value); break; default: reader.skipField(); @@ -695,16 +787,203 @@ proto.bet.beteran.c2se.backend.member.ListMembersResponse.serializeBinaryToWrite protobuf_rpc_error_pb.Error.serializeBinaryToWriter ); } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result + .serializeBinaryToWriter + ); + } + }; + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.repeatedFields_ = + [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.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.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.toObject = + function (includeInstance, msg) { + var f, + obj = { + 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.Result} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result(); + return proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + 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.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.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.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; f = message.getMembersList(); if (f.length > 0) { writer.writeRepeatedMessage( - 2, + 1, f, models_member_member_pb.Member.serializeBinaryToWriter ); } }; +/** + * repeated bet.beteran.member.Member members = 1; + * @return {!Array} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.prototype.getMembersList = + function () { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField( + this, + models_member_member_pb.Member, + 1 + ) + ); + }; + +/** + * @param {!Array} value + * @return {!proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.prototype.setMembersList = + function (value) { + return jspb.Message.setRepeatedWrapperField(this, 1, 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.Result.prototype.addMembers = + function (opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField( + this, + 1, + 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.Result} returns this + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result.prototype.clearMembersList = + function () { + return this.setMembersList([]); + }; + /** * optional bet.protobuf.rpc.Error error = 1; * @return {?proto.bet.protobuf.rpc.Error} @@ -744,52 +1023,45 @@ proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.hasError = }; /** - * repeated bet.beteran.member.Member members = 2; - * @return {!Array} + * optional Result result = 2; + * @return {?proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result} */ -proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.getMembersList = +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.getResult = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( + return /** @type{?proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result} */ ( + jspb.Message.getWrapperField( this, - models_member_member_pb.Member, + proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result, 2 ) ); }; /** - * @param {!Array} value + * @param {?proto.bet.beteran.c2se.backend.member.ListMembersResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.backend.member.ListMembersResponse} returns this */ -proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.setMembersList = +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.setResult = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + return jspb.Message.setWrapperField(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. + * 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.clearMembersList = +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.clearResult = function () { - return this.setMembersList([]); + return this.setResult(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.member.ListMembersResponse.prototype.hasResult = + function () { + return jspb.Message.getField(this, 2) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -969,9 +1241,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) { error: (f = msg.getError()) && protobuf_rpc_error_pb.Error.toObject(includeInstance, f), - member: - (f = msg.getMember()) && - models_member_member_pb.Member.toObject(includeInstance, f), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.toObject( + includeInstance, + f + ), }; if (includeInstance) { @@ -1020,12 +1295,14 @@ proto.bet.beteran.c2se.backend.member.GetMemberResponse.deserializeBinaryFromRea msg.setError(value); break; case 2: - var value = new models_member_member_pb.Member(); + var value = + new proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result(); reader.readMessage( value, - models_member_member_pb.Member.deserializeBinaryFromReader + proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result + .deserializeBinaryFromReader ); - msg.setMember(value); + msg.setResult(value); break; default: reader.skipField(); @@ -1067,16 +1344,182 @@ proto.bet.beteran.c2se.backend.member.GetMemberResponse.serializeBinaryToWriter protobuf_rpc_error_pb.Error.serializeBinaryToWriter ); } - f = message.getMember(); + f = message.getResult(); if (f != null) { writer.writeMessage( 2, f, + proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result + .serializeBinaryToWriter + ); + } + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.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.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.toObject = + function (includeInstance, msg) { + var f, + obj = { + 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.Result} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result(); + return proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + 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.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.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.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getMember(); + if (f != null) { + writer.writeMessage( + 1, + f, models_member_member_pb.Member.serializeBinaryToWriter ); } }; +/** + * optional bet.beteran.member.Member member = 1; + * @return {?proto.bet.beteran.member.Member} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.prototype.getMember = + function () { + return /** @type{?proto.bet.beteran.member.Member} */ ( + jspb.Message.getWrapperField(this, models_member_member_pb.Member, 1) + ); + }; + +/** + * @param {?proto.bet.beteran.member.Member|undefined} value + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.prototype.setMember = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.prototype.clearMember = + function () { + return this.setMember(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result.prototype.hasMember = + function () { + return jspb.Message.getField(this, 1) != null; + }; + /** * optional bet.protobuf.rpc.Error error = 1; * @return {?proto.bet.protobuf.rpc.Error} @@ -1116,21 +1559,25 @@ proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.hasError = }; /** - * optional bet.beteran.member.Member member = 2; - * @return {?proto.bet.beteran.member.Member} + * optional Result result = 2; + * @return {?proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result} */ -proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.getMember = +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.getResult = function () { - return /** @type{?proto.bet.beteran.member.Member} */ ( - jspb.Message.getWrapperField(this, models_member_member_pb.Member, 2) + return /** @type{?proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result, + 2 + ) ); }; /** - * @param {?proto.bet.beteran.member.Member|undefined} value + * @param {?proto.bet.beteran.c2se.backend.member.GetMemberResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.backend.member.GetMemberResponse} returns this */ -proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.setMember = +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.setResult = function (value) { return jspb.Message.setWrapperField(this, 2, value); }; @@ -1139,16 +1586,16 @@ proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.setMember = * 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 = +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.clearResult = function () { - return this.setMember(undefined); + return this.setResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.hasMember = +proto.bet.beteran.c2se.backend.member.GetMemberResponse.prototype.hasResult = function () { return jspb.Message.getField(this, 2) != null; }; @@ -1327,9 +1774,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) { error: (f = msg.getError()) && protobuf_rpc_error_pb.Error.toObject(includeInstance, f), - member: - (f = msg.getMember()) && - models_member_member_pb.Member.toObject(includeInstance, f), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.toObject( + includeInstance, + f + ), }; if (includeInstance) { @@ -1379,12 +1829,14 @@ proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.deserializeBin msg.setError(value); break; case 2: - var value = new models_member_member_pb.Member(); + var value = + new proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result(); reader.readMessage( value, - models_member_member_pb.Member.deserializeBinaryFromReader + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse + .Result.deserializeBinaryFromReader ); - msg.setMember(value); + msg.setResult(value); break; default: reader.skipField(); @@ -1426,16 +1878,182 @@ proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.serializeBinar protobuf_rpc_error_pb.Error.serializeBinaryToWriter ); } - f = message.getMember(); + f = message.getResult(); if (f != null) { writer.writeMessage( 2, f, + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result + .serializeBinaryToWriter + ); + } + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.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.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.toObject = + function (includeInstance, msg) { + var f, + obj = { + 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.Result} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result(); + return proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + 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.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.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.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getMember(); + if (f != null) { + writer.writeMessage( + 1, + f, models_member_member_pb.Member.serializeBinaryToWriter ); } }; +/** + * optional bet.beteran.member.Member member = 1; + * @return {?proto.bet.beteran.member.Member} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.prototype.getMember = + function () { + return /** @type{?proto.bet.beteran.member.Member} */ ( + jspb.Message.getWrapperField(this, models_member_member_pb.Member, 1) + ); + }; + +/** + * @param {?proto.bet.beteran.member.Member|undefined} value + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.prototype.setMember = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result} returns this + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.prototype.clearMember = + function () { + return this.setMember(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result.prototype.hasMember = + function () { + return jspb.Message.getField(this, 1) != null; + }; + /** * optional bet.protobuf.rpc.Error error = 1; * @return {?proto.bet.protobuf.rpc.Error} @@ -1475,21 +2093,26 @@ proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.hasE }; /** - * optional bet.beteran.member.Member member = 2; - * @return {?proto.bet.beteran.member.Member} + * optional Result result = 2; + * @return {?proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result} */ -proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.getMember = +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.getResult = function () { - return /** @type{?proto.bet.beteran.member.Member} */ ( - jspb.Message.getWrapperField(this, models_member_member_pb.Member, 2) + return /** @type{?proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse + .Result, + 2 + ) ); }; /** - * @param {?proto.bet.beteran.member.Member|undefined} value + * @param {?proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse} returns this */ -proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.setMember = +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.setResult = function (value) { return jspb.Message.setWrapperField(this, 2, value); }; @@ -1498,16 +2121,16 @@ proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.setM * 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 = +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.clearResult = function () { - return this.setMember(undefined); + return this.setResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.hasMember = +proto.bet.beteran.c2se.backend.member.GetMemberByUsernameResponse.prototype.hasResult = function () { return jspb.Message.getField(this, 2) != null; }; diff --git a/src/app/modules/protobuf/c2se/common/identity_pb.d.ts b/src/app/modules/protobuf/c2se/common/identity_pb.d.ts index 6944505..0e1decc 100644 --- a/src/app/modules/protobuf/c2se/common/identity_pb.d.ts +++ b/src/app/modules/protobuf/c2se/common/identity_pb.d.ts @@ -45,10 +45,10 @@ export class CheckUsernameForDuplicationResponse extends jspb.Message { 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; + hasResult(): boolean; + clearResult(): void; + getResult(): CheckUsernameForDuplicationResponse.Result | undefined; + setResult(value?: CheckUsernameForDuplicationResponse.Result): void; serializeBinary(): Uint8Array; toObject( @@ -78,8 +78,36 @@ export class CheckUsernameForDuplicationResponse extends jspb.Message { export namespace CheckUsernameForDuplicationResponse { export type AsObject = { error?: protobuf_rpc_error_pb.Error.AsObject; - duplicated: boolean; + result?: CheckUsernameForDuplicationResponse.Result.AsObject; }; + + export class Result extends jspb.Message { + getDuplicated(): boolean; + setDuplicated(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Result, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; + } + + export namespace Result { + export type AsObject = { + duplicated: boolean; + }; + } } export class CheckNicknameForDuplicationRequest extends jspb.Message { @@ -123,10 +151,10 @@ export class CheckNicknameForDuplicationResponse extends jspb.Message { 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; + hasResult(): boolean; + clearResult(): void; + getResult(): CheckNicknameForDuplicationResponse.Result | undefined; + setResult(value?: CheckNicknameForDuplicationResponse.Result): void; serializeBinary(): Uint8Array; toObject( @@ -156,8 +184,36 @@ export class CheckNicknameForDuplicationResponse extends jspb.Message { export namespace CheckNicknameForDuplicationResponse { export type AsObject = { error?: protobuf_rpc_error_pb.Error.AsObject; - duplicated: boolean; + result?: CheckNicknameForDuplicationResponse.Result.AsObject; }; + + export class Result extends jspb.Message { + getDuplicated(): boolean; + setDuplicated(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Result, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; + } + + export namespace Result { + export type AsObject = { + duplicated: boolean; + }; + } } export class CaptchaRequest extends jspb.Message { @@ -192,15 +248,10 @@ export class CaptchaResponse extends jspb.Message { 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; + hasResult(): boolean; + clearResult(): void; + getResult(): CaptchaResponse.Result | undefined; + setResult(value?: CaptchaResponse.Result): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CaptchaResponse.AsObject; @@ -226,7 +277,38 @@ export class CaptchaResponse extends jspb.Message { export namespace CaptchaResponse { export type AsObject = { error?: protobuf_rpc_error_pb.Error.AsObject; - token: string; - image: string; + result?: CaptchaResponse.Result.AsObject; }; + + export class Result extends jspb.Message { + getToken(): string; + setToken(value: string): void; + + getImage(): string; + setImage(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Result, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; + } + + export namespace Result { + export type 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 index 0bb9bdb..8100c5a 100644 --- a/src/app/modules/protobuf/c2se/common/identity_pb.js +++ b/src/app/modules/protobuf/c2se/common/identity_pb.js @@ -29,6 +29,11 @@ goog.exportSymbol( null, global ); +goog.exportSymbol( + "proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result", + null, + global +); goog.exportSymbol( "proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationRequest", null, @@ -39,6 +44,11 @@ goog.exportSymbol( null, global ); +goog.exportSymbol( + "proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result", + null, + global +); goog.exportSymbol( "proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationRequest", null, @@ -49,6 +59,11 @@ goog.exportSymbol( null, global ); +goog.exportSymbol( + "proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result", + null, + global +); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -101,6 +116,33 @@ if (goog.DEBUG && !COMPILED) { 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.CheckUsernameForDuplicationResponse.Result = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse + .Result, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.displayName = + "proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result"; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -153,6 +195,33 @@ if (goog.DEBUG && !COMPILED) { 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.CheckNicknameForDuplicationResponse.Result = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse + .Result, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.displayName = + "proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result"; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -203,6 +272,33 @@ if (goog.DEBUG && !COMPILED) { proto.bet.beteran.c2se.common.identity.CaptchaResponse.displayName = "proto.bet.beteran.c2se.common.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.c2se.common.identity.CaptchaResponse.Result = function ( + opt_data +) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.displayName = + "proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result"; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** @@ -378,7 +474,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) { error: (f = msg.getError()) && protobuf_rpc_error_pb.Error.toObject(includeInstance, f), - duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.toObject( + includeInstance, + f + ), }; if (includeInstance) { @@ -428,8 +529,15 @@ proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.deser msg.setError(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDuplicated(value); + var value = + new proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.common.identity + .CheckUsernameForDuplicationResponse.Result + .deserializeBinaryFromReader + ); + msg.setResult(value); break; default: reader.skipField(); @@ -471,12 +579,154 @@ proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.seria protobuf_rpc_error_pb.Error.serializeBinaryToWriter ); } - f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + f = message.getResult(); if (f != null) { - writer.writeBool(2, f); + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.common.identity + .CheckUsernameForDuplicationResponse.Result.serializeBinaryToWriter + ); } }; +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.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.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.toObject = + function (includeInstance, msg) { + var f, + obj = { + duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 1, 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.Result} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result(); + return proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + 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.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.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.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getDuplicated(); + if (f) { + writer.writeBool(1, f); + } + }; + +/** + * optional bool duplicated = 1; + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.prototype.getDuplicated = + function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 1, false) + ); + }; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result.prototype.setDuplicated = + function (value) { + return jspb.Message.setProto3BooleanField(this, 1, value); + }; + /** * optional bet.protobuf.rpc.Error error = 1; * @return {?proto.bet.protobuf.rpc.Error} @@ -516,39 +766,44 @@ proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.proto }; /** - * optional bool duplicated = 2; - * @return {boolean} + * optional Result result = 2; + * @return {?proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result} */ -proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.getDuplicated = +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.getResult = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 2, false) + return /** @type{?proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.common.identity + .CheckUsernameForDuplicationResponse.Result, + 2 + ) ); }; /** - * @param {boolean} value + * @param {?proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse} returns this */ -proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.setDuplicated = +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.setResult = function (value) { - return jspb.Message.setField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** - * Clears the field making it undefined. + * 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.clearDuplicated = +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.clearResult = function () { - return jspb.Message.setField(this, 2, undefined); + return this.setResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.hasDuplicated = +proto.bet.beteran.c2se.common.identity.CheckUsernameForDuplicationResponse.prototype.hasResult = function () { return jspb.Message.getField(this, 2) != null; }; @@ -727,7 +982,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) { error: (f = msg.getError()) && protobuf_rpc_error_pb.Error.toObject(includeInstance, f), - duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.toObject( + includeInstance, + f + ), }; if (includeInstance) { @@ -777,8 +1037,15 @@ proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.deser msg.setError(value); break; case 2: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDuplicated(value); + var value = + new proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.common.identity + .CheckNicknameForDuplicationResponse.Result + .deserializeBinaryFromReader + ); + msg.setResult(value); break; default: reader.skipField(); @@ -820,12 +1087,154 @@ proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.seria protobuf_rpc_error_pb.Error.serializeBinaryToWriter ); } - f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + f = message.getResult(); if (f != null) { - writer.writeBool(2, f); + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.common.identity + .CheckNicknameForDuplicationResponse.Result.serializeBinaryToWriter + ); } }; +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.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.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.toObject = + function (includeInstance, msg) { + var f, + obj = { + duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 1, 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.Result} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result(); + return proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + 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.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.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.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getDuplicated(); + if (f) { + writer.writeBool(1, f); + } + }; + +/** + * optional bool duplicated = 1; + * @return {boolean} + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.prototype.getDuplicated = + function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 1, false) + ); + }; + +/** + * @param {boolean} value + * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result} returns this + */ +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result.prototype.setDuplicated = + function (value) { + return jspb.Message.setProto3BooleanField(this, 1, value); + }; + /** * optional bet.protobuf.rpc.Error error = 1; * @return {?proto.bet.protobuf.rpc.Error} @@ -865,39 +1274,44 @@ proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.proto }; /** - * optional bool duplicated = 2; - * @return {boolean} + * optional Result result = 2; + * @return {?proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result} */ -proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.getDuplicated = +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.getResult = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 2, false) + return /** @type{?proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.common.identity + .CheckNicknameForDuplicationResponse.Result, + 2 + ) ); }; /** - * @param {boolean} value + * @param {?proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse} returns this */ -proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.setDuplicated = +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.setResult = function (value) { - return jspb.Message.setField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** - * Clears the field making it undefined. + * 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.clearDuplicated = +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.clearResult = function () { - return jspb.Message.setField(this, 2, undefined); + return this.setResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.hasDuplicated = +proto.bet.beteran.c2se.common.identity.CheckNicknameForDuplicationResponse.prototype.hasResult = function () { return jspb.Message.getField(this, 2) != null; }; @@ -1049,8 +1463,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) { error: (f = msg.getError()) && protobuf_rpc_error_pb.Error.toObject(includeInstance, f), - token: jspb.Message.getFieldWithDefault(msg, 2, ""), - image: jspb.Message.getFieldWithDefault(msg, 3, ""), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.toObject( + includeInstance, + f + ), }; if (includeInstance) { @@ -1099,12 +1517,14 @@ proto.bet.beteran.c2se.common.identity.CaptchaResponse.deserializeBinaryFromRead 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); + var value = + new proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result + .deserializeBinaryFromReader + ); + msg.setResult(value); break; default: reader.skipField(); @@ -1146,14 +1566,181 @@ proto.bet.beteran.c2se.common.identity.CaptchaResponse.serializeBinaryToWriter = protobuf_rpc_error_pb.Error.serializeBinaryToWriter ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); + f = message.getResult(); if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result + .serializeBinaryToWriter + ); + } + }; + +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.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.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.toObject = + function (includeInstance, msg) { + var f, + obj = { + token: jspb.Message.getFieldWithDefault(msg, 1, ""), + image: 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.common.identity.CaptchaResponse.Result} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result(); + return proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.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.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.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.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.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getToken(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getImage(); + if (f.length > 0) { writer.writeString(2, f); } - f = /** @type {string} */ (jspb.Message.getField(message, 3)); - if (f != null) { - writer.writeString(3, f); - } + }; + +/** + * optional string token = 1; + * @return {string} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.prototype.getToken = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result} returns this + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.prototype.setToken = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + +/** + * optional string image = 2; + * @return {string} + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.prototype.getImage = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result} returns this + */ +proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result.prototype.setImage = + function (value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** @@ -1195,79 +1782,45 @@ proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.hasError = }; /** - * optional string token = 2; - * @return {string} + * optional Result result = 2; + * @return {?proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result} */ -proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.getToken = +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.getResult = function () { - return /** @type {string} */ ( - jspb.Message.getFieldWithDefault(this, 2, "") + return /** @type{?proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result, + 2 + ) ); }; /** - * @param {string} value + * @param {?proto.bet.beteran.c2se.common.identity.CaptchaResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.common.identity.CaptchaResponse} returns this */ -proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.setToken = +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.setResult = function (value) { - return jspb.Message.setField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** - * Clears the field making it undefined. + * 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.clearToken = +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.clearResult = function () { - return jspb.Message.setField(this, 2, undefined); + return this.setResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.hasToken = +proto.bet.beteran.c2se.common.identity.CaptchaResponse.prototype.hasResult = 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 index 71ac8f1..a43dd6a 100644 --- a/src/app/modules/protobuf/c2se/core/network_pb.d.ts +++ b/src/app/modules/protobuf/c2se/core/network_pb.d.ts @@ -2,3 +2,5 @@ // file: c2se/core/network.proto import * as jspb from 'google-protobuf'; + +export const HEADER_CLIENT: string; diff --git a/src/app/modules/protobuf/c2se/core/network_pb.js b/src/app/modules/protobuf/c2se/core/network_pb.js index 08751ba..ceacb8e 100644 --- a/src/app/modules/protobuf/c2se/core/network_pb.js +++ b/src/app/modules/protobuf/c2se/core/network_pb.js @@ -16,3 +16,12 @@ var goog = jspb; var global = function () { return this || window || global || self || Function("return this")(); }.call(null); + +goog.exportSymbol("proto.bet.beteran.c2se.core.network", null, global); + +proto.bet.beteran.c2se.core.network = {}; + +proto.bet.beteran.c2se.core.network.HEADER_CLIENT = + "bet.beteran.c2se.core.network.Client"; + +goog.object.extend(exports, proto.bet.beteran.c2se.core.network); diff --git a/src/app/modules/protobuf/c2se/frontend/identity_pb.d.ts b/src/app/modules/protobuf/c2se/frontend/identity_pb.d.ts index 3687d79..8774539 100644 --- a/src/app/modules/protobuf/c2se/frontend/identity_pb.d.ts +++ b/src/app/modules/protobuf/c2se/frontend/identity_pb.d.ts @@ -4,6 +4,14 @@ import * as jspb from 'google-protobuf'; import * as protobuf_rpc_error_pb from '../../protobuf/rpc/error_pb'; +export const SUBJECT_CHECK_USERNAME_FOR_DUPLICATION: string; + +export const SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION: string; + +export const SUBJECT_CAPTCHA: string; + +export const SUBJECT_SIGNIN: string; + export class SigninRequest extends jspb.Message { getToken(): string; setToken(value: string): void; @@ -53,10 +61,10 @@ export class SigninResponse extends jspb.Message { 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; + hasResult(): boolean; + clearResult(): void; + getResult(): SigninResponse.Result | undefined; + setResult(value?: SigninResponse.Result): void; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SigninResponse.AsObject; @@ -82,6 +90,34 @@ export class SigninResponse extends jspb.Message { export namespace SigninResponse { export type AsObject = { error?: protobuf_rpc_error_pb.Error.AsObject; - sessionId: string; + result?: SigninResponse.Result.AsObject; }; + + export class Result extends jspb.Message { + getSessionId(): string; + setSessionId(value: string): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): Result.AsObject; + static toObject(includeInstance: boolean, msg: Result): Result.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: Result, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): Result; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; + } + + export namespace Result { + export type 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 index b6aa1a7..54a5b7c 100644 --- a/src/app/modules/protobuf/c2se/frontend/identity_pb.js +++ b/src/app/modules/protobuf/c2se/frontend/identity_pb.js @@ -29,6 +29,24 @@ goog.exportSymbol( null, global ); +goog.exportSymbol( + "proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result", + null, + global +); + +proto.bet.beteran.c2se.frontend.identity.SUBJECT_CHECK_USERNAME_FOR_DUPLICATION = + "bet.beteran.c2se.frontend.identity.CheckUsernameForDuplication"; + +proto.bet.beteran.c2se.frontend.identity.SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION = + "bet.beteran.c2se.frontend.identity.CheckNicknameForDuplication"; + +proto.bet.beteran.c2se.frontend.identity.SUBJECT_CAPTCHA = + "bet.beteran.c2se.frontend.identity.Captcha"; + +proto.bet.beteran.c2se.frontend.identity.SUBJECT_SIGNIN = + "bet.beteran.c2se.frontend.identity.Signin"; + /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -79,6 +97,33 @@ if (goog.DEBUG && !COMPILED) { proto.bet.beteran.c2se.frontend.identity.SigninResponse.displayName = "proto.bet.beteran.c2se.frontend.identity.SigninResponse"; } +/** + * 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.Result = function ( + opt_data +) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.displayName = + "proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result"; +} if (jspb.Message.GENERATE_TO_OBJECT) { /** @@ -344,7 +389,12 @@ if (jspb.Message.GENERATE_TO_OBJECT) { error: (f = msg.getError()) && protobuf_rpc_error_pb.Error.toObject(includeInstance, f), - sessionId: jspb.Message.getFieldWithDefault(msg, 2, ""), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.toObject( + includeInstance, + f + ), }; if (includeInstance) { @@ -393,8 +443,14 @@ proto.bet.beteran.c2se.frontend.identity.SigninResponse.deserializeBinaryFromRea msg.setError(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSessionId(value); + var value = + new proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result + .deserializeBinaryFromReader + ); + msg.setResult(value); break; default: reader.skipField(); @@ -436,12 +492,154 @@ proto.bet.beteran.c2se.frontend.identity.SigninResponse.serializeBinaryToWriter protobuf_rpc_error_pb.Error.serializeBinaryToWriter ); } - f = /** @type {string} */ (jspb.Message.getField(message, 2)); + f = message.getResult(); if (f != null) { - writer.writeString(2, f); + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result + .serializeBinaryToWriter + ); } }; +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.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.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.toObject = + function (includeInstance, msg) { + var f, + obj = { + sessionId: 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.frontend.identity.SigninResponse.Result} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result(); + return proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.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.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.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.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.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getSessionId(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; + +/** + * optional string session_id = 1; + * @return {string} + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.prototype.getSessionId = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result} returns this + */ +proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result.prototype.setSessionId = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + /** * optional bet.protobuf.rpc.Error error = 1; * @return {?proto.bet.protobuf.rpc.Error} @@ -481,39 +679,43 @@ proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.hasError = }; /** - * optional string session_id = 2; - * @return {string} + * optional Result result = 2; + * @return {?proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result} */ -proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.getSessionId = +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.getResult = function () { - return /** @type {string} */ ( - jspb.Message.getFieldWithDefault(this, 2, "") + return /** @type{?proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result, + 2 + ) ); }; /** - * @param {string} value + * @param {?proto.bet.beteran.c2se.frontend.identity.SigninResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.frontend.identity.SigninResponse} returns this */ -proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.setSessionId = +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.setResult = function (value) { - return jspb.Message.setField(this, 2, value); + return jspb.Message.setWrapperField(this, 2, value); }; /** - * Clears the field making it undefined. + * 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.clearSessionId = +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.clearResult = function () { - return jspb.Message.setField(this, 2, undefined); + return this.setResult(undefined); }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.hasSessionId = +proto.bet.beteran.c2se.frontend.identity.SigninResponse.prototype.hasResult = function () { return jspb.Message.getField(this, 2) != null; }; diff --git a/src/app/modules/protobuf/ss/member/identity_pb.d.ts b/src/app/modules/protobuf/ss/member/identity_pb.d.ts deleted file mode 100644 index 817aa22..0000000 --- a/src/app/modules/protobuf/ss/member/identity_pb.d.ts +++ /dev/null @@ -1,340 +0,0 @@ -// 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 deleted file mode 100644 index 39d826a..0000000 --- a/src/app/modules/protobuf/ss/member/identity_pb.js +++ /dev/null @@ -1,1999 +0,0 @@ -// 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); diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index c966979..16298ab 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,3 +1,10 @@ -export const environment = { +import { Environment } from './environment.type'; + +export const environment: Environment = { production: true, + nats: { + connectionOptions: { + servers: ['ws://192.168.50.200:8088'], + }, + }, }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 31cb785..ed141e9 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -2,8 +2,15 @@ // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. -export const environment = { +import { Environment } from './environment.type'; + +export const environment: Environment = { production: false, + nats: { + connectionOptions: { + servers: ['ws://192.168.50.200:8088'], + }, + }, }; /* diff --git a/src/environments/environment.type.ts b/src/environments/environment.type.ts new file mode 100644 index 0000000..fc344ad --- /dev/null +++ b/src/environments/environment.type.ts @@ -0,0 +1,8 @@ +import * as nats from 'nats.ws'; + +export interface Environment { + production: boolean; + nats: { + connectionOptions: nats.ConnectionOptions; + }; +}