diff --git a/src/app/core/auth/auth.service.ts b/src/app/core/auth/auth.service.ts index 97e1020..bbe0371 100644 --- a/src/app/core/auth/auth.service.ts +++ b/src/app/core/auth/auth.service.ts @@ -2,7 +2,8 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { catchError, Observable, of, switchMap, throwError } from 'rxjs'; import { AuthUtils } from 'app/core/auth/auth.utils'; -import { UserService } from 'app/core/user/user.service'; +import { WebSessionStorageService } from 'app/core/web-storage/services/web-session-storage.service'; +import { IdentityService } from 'app/modules/polyglot/identity/services/identity.service'; @Injectable() export class AuthService { @@ -13,7 +14,8 @@ export class AuthService { */ constructor( private _httpClient: HttpClient, - private _userService: UserService + private _identityService: IdentityService, + private __webSessionStorageService: WebSessionStorageService ) {} // ----------------------------------------------------------------------------------------------------- @@ -58,27 +60,32 @@ export class AuthService { * * @param credentials */ - signIn(credentials: { email: string; password: string }): Observable { - // Throw error, if the user is already logged in - if (this._authenticated) { - return throwError('User is already logged in.'); - } + signIn(credentials: { username: string; password: string }): Promise { + return new Promise((resolve, reject) => { + // Throw error, if the user is already logged in + if (this._authenticated) { + return reject('User is already logged in.'); + } - return this._httpClient.post('api/auth/sign-in', credentials).pipe( - switchMap((response: any) => { - // Store the access token in the local storage - this.accessToken = response.accessToken; + this._identityService + .signinWithoutSecurityCode(credentials.username, credentials.password) + .then((res) => { + this.__webSessionStorageService.set( + 'accessToken', + res.getAccessToken() + ); - // Set the authenticated flag to true - this._authenticated = true; + // Store the access token in the local storage + this.accessToken = res.getAccessToken(); - // Store the user on the user service - this._userService.user = response.user; - - // Return a new observable with the response - return of(response); - }) - ); + // Set the authenticated flag to true + this._authenticated = true; + resolve(); + }) + .catch((e) => { + reject(e); + }); + }); } /** @@ -102,9 +109,6 @@ export class AuthService { // Set the authenticated flag to true this._authenticated = true; - // Store the user on the user service - this._userService.user = response.user; - // Return true return of(true); }) @@ -171,6 +175,7 @@ export class AuthService { } // If the access token exists and it didn't expire, sign in using it - return this.signInUsingToken(); + // return this.signInUsingToken(); + return of(true); } } diff --git a/src/app/modules/polyglot/identity/services/identity.service.ts b/src/app/modules/polyglot/identity/services/identity.service.ts index 5d940b6..8027cf2 100644 --- a/src/app/modules/polyglot/identity/services/identity.service.ts +++ b/src/app/modules/polyglot/identity/services/identity.service.ts @@ -12,12 +12,15 @@ import { CaptchaResponse, SigninRequest, SigninResponse, + SigninWithoutSecurityCodeRequest, + SigninWithoutSecurityCodeResponse, } from 'app/modules/proto/c2se/identity_pb'; import { SUBJECT_CHECK_USERNAME_FOR_DUPLICATION, SUBJECT_CHECK_NICKNAME_FOR_DUPLICATION, SUBJECT_CAPTCHA, SUBJECT_SIGNIN, + SUBJECT_SIGNIN_WITHOUT_SECURITY_CODE, } from 'app/modules/proto/c2se/frontend/identity_pb'; @Injectable({ @@ -129,4 +132,31 @@ export class IdentityService { }); }); } + + signinWithoutSecurityCode( + username: string, + password: string + ): Promise { + return new Promise( + (resolve, reject) => { + let req = new SigninWithoutSecurityCodeRequest(); + req.setUsername(username); + req.setPassword(password); + + this.__natsService + .request( + SUBJECT_SIGNIN_WITHOUT_SECURITY_CODE, + req.serializeBinary(), + SigninWithoutSecurityCodeResponse.deserializeBinary + ) + .then((result) => { + resolve(result); + }) + .catch((e: Error) => { + console.log('failed', e); + reject(e); + }); + } + ); + } } diff --git a/src/app/modules/proto/c2se/frontend/identity_pb.d.ts b/src/app/modules/proto/c2se/frontend/identity_pb.d.ts index 230b25c..6543fea 100644 --- a/src/app/modules/proto/c2se/frontend/identity_pb.d.ts +++ b/src/app/modules/proto/c2se/frontend/identity_pb.d.ts @@ -7,3 +7,4 @@ 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 const SUBJECT_SIGNIN_WITHOUT_SECURITY_CODE: string; diff --git a/src/app/modules/proto/c2se/frontend/identity_pb.js b/src/app/modules/proto/c2se/frontend/identity_pb.js index f5a7ca8..3b0f79e 100644 --- a/src/app/modules/proto/c2se/frontend/identity_pb.js +++ b/src/app/modules/proto/c2se/frontend/identity_pb.js @@ -29,5 +29,7 @@ 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"; +proto.bet.beteran.c2se.frontend.identity.SUBJECT_SIGNIN_WITHOUT_SECURITY_CODE = + "bet.beteran.c2se.frontend.identity.SigninWithoutSecurityCode"; goog.object.extend(exports, proto.bet.beteran.c2se.frontend.identity); diff --git a/src/app/modules/proto/c2se/identity_pb.d.ts b/src/app/modules/proto/c2se/identity_pb.d.ts index 1c7dd31..665722a 100644 --- a/src/app/modules/proto/c2se/identity_pb.d.ts +++ b/src/app/modules/proto/c2se/identity_pb.d.ts @@ -1,27 +1,42 @@ // package: bet.beteran.c2se.identity // file: c2se/identity.proto -import * as jspb from "google-protobuf"; -import * as protobuf_rpc_pb from "../protobuf/rpc_pb"; +import * as jspb from 'google-protobuf'; +import * as protobuf_rpc_pb from '../protobuf/rpc_pb'; export class CheckUsernameForDuplicationRequest extends jspb.Message { getUsername(): string; setUsername(value: string): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckUsernameForDuplicationRequest.AsObject; - static toObject(includeInstance: boolean, msg: CheckUsernameForDuplicationRequest): CheckUsernameForDuplicationRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckUsernameForDuplicationRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckUsernameForDuplicationRequest; - static deserializeBinaryFromReader(message: CheckUsernameForDuplicationRequest, reader: jspb.BinaryReader): CheckUsernameForDuplicationRequest; + toObject( + includeInstance?: boolean + ): CheckUsernameForDuplicationRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckUsernameForDuplicationRequest + ): CheckUsernameForDuplicationRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckUsernameForDuplicationRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckUsernameForDuplicationRequest; + static deserializeBinaryFromReader( + message: CheckUsernameForDuplicationRequest, + reader: jspb.BinaryReader + ): CheckUsernameForDuplicationRequest; } export namespace CheckUsernameForDuplicationRequest { export type AsObject = { - username: string, - } + username: string; + }; } export class CheckUsernameForDuplicationResponse extends jspb.Message { @@ -36,20 +51,35 @@ export class CheckUsernameForDuplicationResponse extends jspb.Message { setResult(value?: CheckUsernameForDuplicationResponse.Result): 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; + 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_pb.Error.AsObject, - result?: CheckUsernameForDuplicationResponse.Result.AsObject, - } + error?: protobuf_rpc_pb.Error.AsObject; + result?: CheckUsernameForDuplicationResponse.Result.AsObject; + }; export class Result extends jspb.Message { getDuplicated(): boolean; @@ -58,17 +88,25 @@ export namespace CheckUsernameForDuplicationResponse { 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 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; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; } export namespace Result { export type AsObject = { - duplicated: boolean, - } + duplicated: boolean; + }; } } @@ -77,19 +115,34 @@ export class CheckNicknameForDuplicationRequest extends jspb.Message { 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; + toObject( + includeInstance?: boolean + ): CheckNicknameForDuplicationRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: CheckNicknameForDuplicationRequest + ): CheckNicknameForDuplicationRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: CheckNicknameForDuplicationRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): CheckNicknameForDuplicationRequest; + static deserializeBinaryFromReader( + message: CheckNicknameForDuplicationRequest, + reader: jspb.BinaryReader + ): CheckNicknameForDuplicationRequest; } export namespace CheckNicknameForDuplicationRequest { export type AsObject = { - nickname: string, - } + nickname: string; + }; } export class CheckNicknameForDuplicationResponse extends jspb.Message { @@ -104,20 +157,35 @@ export class CheckNicknameForDuplicationResponse extends jspb.Message { setResult(value?: CheckNicknameForDuplicationResponse.Result): 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; + 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_pb.Error.AsObject, - result?: CheckNicknameForDuplicationResponse.Result.AsObject, - } + error?: protobuf_rpc_pb.Error.AsObject; + result?: CheckNicknameForDuplicationResponse.Result.AsObject; + }; export class Result extends jspb.Message { getDuplicated(): boolean; @@ -126,34 +194,52 @@ export namespace CheckNicknameForDuplicationResponse { 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 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; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; } export namespace Result { export type AsObject = { - duplicated: boolean, - } + duplicated: boolean; + }; } } export class CaptchaRequest extends jspb.Message { serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CaptchaRequest.AsObject; - static toObject(includeInstance: boolean, msg: CaptchaRequest): CaptchaRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CaptchaRequest, writer: jspb.BinaryWriter): void; + static 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; + static deserializeBinaryFromReader( + message: CaptchaRequest, + reader: jspb.BinaryReader + ): CaptchaRequest; } export namespace CaptchaRequest { - export type AsObject = { - } + export type AsObject = {}; } export class CaptchaResponse extends jspb.Message { @@ -169,19 +255,30 @@ export class CaptchaResponse extends jspb.Message { 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 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; + static deserializeBinaryFromReader( + message: CaptchaResponse, + reader: jspb.BinaryReader + ): CaptchaResponse; } export namespace CaptchaResponse { export type AsObject = { - error?: protobuf_rpc_pb.Error.AsObject, - result?: CaptchaResponse.Result.AsObject, - } + error?: protobuf_rpc_pb.Error.AsObject; + result?: CaptchaResponse.Result.AsObject; + }; export class Result extends jspb.Message { getSecurityCodeHash(): string; @@ -193,18 +290,26 @@ export namespace CaptchaResponse { 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 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; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; } export namespace Result { export type AsObject = { - securityCodeHash: string, - image: string, - } + securityCodeHash: string; + image: string; + }; } } @@ -223,21 +328,32 @@ export class SigninRequest extends jspb.Message { 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 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; + static deserializeBinaryFromReader( + message: SigninRequest, + reader: jspb.BinaryReader + ): SigninRequest; } export namespace SigninRequest { export type AsObject = { - securityCodeHash: string, - securityCode: string, - username: string, - password: string, - } + securityCodeHash: string; + securityCode: string; + username: string; + password: string; + }; } export class SigninResponse extends jspb.Message { @@ -253,19 +369,30 @@ export class SigninResponse extends jspb.Message { 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 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; + static deserializeBinaryFromReader( + message: SigninResponse, + reader: jspb.BinaryReader + ): SigninResponse; } export namespace SigninResponse { export type AsObject = { - error?: protobuf_rpc_pb.Error.AsObject, - result?: SigninResponse.Result.AsObject, - } + error?: protobuf_rpc_pb.Error.AsObject; + result?: SigninResponse.Result.AsObject; + }; export class Result extends jspb.Message { getAccessToken(): string; @@ -274,17 +401,132 @@ export namespace SigninResponse { 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 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; + static deserializeBinaryFromReader( + message: Result, + reader: jspb.BinaryReader + ): Result; } export namespace Result { export type AsObject = { - accessToken: string, - } + accessToken: string; + }; } } +export class SigninWithoutSecurityCodeRequest extends jspb.Message { + getUsername(): string; + setUsername(value: string): void; + + getPassword(): string; + setPassword(value: string): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): SigninWithoutSecurityCodeRequest.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninWithoutSecurityCodeRequest + ): SigninWithoutSecurityCodeRequest.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninWithoutSecurityCodeRequest, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary(bytes: Uint8Array): SigninWithoutSecurityCodeRequest; + static deserializeBinaryFromReader( + message: SigninWithoutSecurityCodeRequest, + reader: jspb.BinaryReader + ): SigninWithoutSecurityCodeRequest; +} + +export namespace SigninWithoutSecurityCodeRequest { + export type AsObject = { + username: string; + password: string; + }; +} + +export class SigninWithoutSecurityCodeResponse extends jspb.Message { + hasError(): boolean; + clearError(): void; + getError(): protobuf_rpc_pb.Error | undefined; + setError(value?: protobuf_rpc_pb.Error): void; + + hasResult(): boolean; + clearResult(): void; + getResult(): SigninWithoutSecurityCodeResponse.Result | undefined; + setResult(value?: SigninWithoutSecurityCodeResponse.Result): void; + + serializeBinary(): Uint8Array; + toObject( + includeInstance?: boolean + ): SigninWithoutSecurityCodeResponse.AsObject; + static toObject( + includeInstance: boolean, + msg: SigninWithoutSecurityCodeResponse + ): SigninWithoutSecurityCodeResponse.AsObject; + static extensions: { [key: number]: jspb.ExtensionFieldInfo }; + static extensionsBinary: { + [key: number]: jspb.ExtensionFieldBinaryInfo; + }; + static serializeBinaryToWriter( + message: SigninWithoutSecurityCodeResponse, + writer: jspb.BinaryWriter + ): void; + static deserializeBinary( + bytes: Uint8Array + ): SigninWithoutSecurityCodeResponse; + static deserializeBinaryFromReader( + message: SigninWithoutSecurityCodeResponse, + reader: jspb.BinaryReader + ): SigninWithoutSecurityCodeResponse; +} + +export namespace SigninWithoutSecurityCodeResponse { + export type AsObject = { + error?: protobuf_rpc_pb.Error.AsObject; + result?: SigninWithoutSecurityCodeResponse.Result.AsObject; + }; + + export class Result extends jspb.Message { + getAccessToken(): string; + setAccessToken(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 = { + accessToken: string; + }; + } +} diff --git a/src/app/modules/proto/c2se/identity_pb.js b/src/app/modules/proto/c2se/identity_pb.js index 3844b9b..9f86a43 100644 --- a/src/app/modules/proto/c2se/identity_pb.js +++ b/src/app/modules/proto/c2se/identity_pb.js @@ -11,24 +11,89 @@ /* eslint-disable */ // @ts-nocheck -var jspb = require('google-protobuf'); +var jspb = require("google-protobuf"); var goog = jspb; -var global = (function() { return this || window || global || self || Function('return this')(); }).call(null); +var global = function () { + return this || window || global || self || Function("return this")(); +}.call(null); -var protobuf_rpc_pb = require('../protobuf/rpc_pb.js'); +var protobuf_rpc_pb = require("../protobuf/rpc_pb.js"); goog.object.extend(proto, protobuf_rpc_pb); -goog.exportSymbol('proto.bet.beteran.c2se.identity.CaptchaRequest', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.CaptchaResponse', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.CaptchaResponse.Result', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.SigninRequest', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.SigninResponse', null, global); -goog.exportSymbol('proto.bet.beteran.c2se.identity.SigninResponse.Result', null, global); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.CaptchaRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.CaptchaResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.CaptchaResponse.Result", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.SigninRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.SigninResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.SigninResponse.Result", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse", + null, + global +); +goog.exportSymbol( + "proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result", + null, + global +); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -39,16 +104,22 @@ goog.exportSymbol('proto.bet.beteran.c2se.identity.SigninResponse.Result', null, * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest = function(opt_data) { +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest = function ( + opt_data +) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest, jspb.Message); +goog.inherits( + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest, + jspb.Message +); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.displayName = 'proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest'; + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.displayName = + "proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest"; } /** * Generated by JsPbCodeGenerator. @@ -60,16 +131,22 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse = function(opt_data) { +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse = function ( + opt_data +) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse, jspb.Message); +goog.inherits( + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse, + jspb.Message +); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.displayName = 'proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse'; + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.displayName = + "proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse"; } /** * Generated by JsPbCodeGenerator. @@ -81,16 +158,21 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result, jspb.Message); +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result, + jspb.Message +); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.displayName = 'proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result'; + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.displayName = + "proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result"; } /** * Generated by JsPbCodeGenerator. @@ -102,16 +184,22 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest = function(opt_data) { +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest = function ( + opt_data +) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest, jspb.Message); +goog.inherits( + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest, + jspb.Message +); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.displayName = 'proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest'; + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.displayName = + "proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest"; } /** * Generated by JsPbCodeGenerator. @@ -123,16 +211,22 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse = function(opt_data) { +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse = function ( + opt_data +) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse, jspb.Message); +goog.inherits( + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse, + jspb.Message +); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.displayName = 'proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse'; + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.displayName = + "proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse"; } /** * Generated by JsPbCodeGenerator. @@ -144,16 +238,21 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result, jspb.Message); +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result, + jspb.Message +); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.displayName = 'proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result'; + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.displayName = + "proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result"; } /** * Generated by JsPbCodeGenerator. @@ -165,7 +264,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.CaptchaRequest = function(opt_data) { +proto.bet.beteran.c2se.identity.CaptchaRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bet.beteran.c2se.identity.CaptchaRequest, jspb.Message); @@ -174,7 +273,8 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.bet.beteran.c2se.identity.CaptchaRequest.displayName = 'proto.bet.beteran.c2se.identity.CaptchaRequest'; + proto.bet.beteran.c2se.identity.CaptchaRequest.displayName = + "proto.bet.beteran.c2se.identity.CaptchaRequest"; } /** * Generated by JsPbCodeGenerator. @@ -186,7 +286,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.CaptchaResponse = function(opt_data) { +proto.bet.beteran.c2se.identity.CaptchaResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bet.beteran.c2se.identity.CaptchaResponse, jspb.Message); @@ -195,7 +295,8 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.bet.beteran.c2se.identity.CaptchaResponse.displayName = 'proto.bet.beteran.c2se.identity.CaptchaResponse'; + proto.bet.beteran.c2se.identity.CaptchaResponse.displayName = + "proto.bet.beteran.c2se.identity.CaptchaResponse"; } /** * Generated by JsPbCodeGenerator. @@ -207,16 +308,20 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result = function(opt_data) { +proto.bet.beteran.c2se.identity.CaptchaResponse.Result = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.bet.beteran.c2se.identity.CaptchaResponse.Result, jspb.Message); +goog.inherits( + proto.bet.beteran.c2se.identity.CaptchaResponse.Result, + jspb.Message +); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.bet.beteran.c2se.identity.CaptchaResponse.Result.displayName = 'proto.bet.beteran.c2se.identity.CaptchaResponse.Result'; + proto.bet.beteran.c2se.identity.CaptchaResponse.Result.displayName = + "proto.bet.beteran.c2se.identity.CaptchaResponse.Result"; } /** * Generated by JsPbCodeGenerator. @@ -228,7 +333,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.SigninRequest = function(opt_data) { +proto.bet.beteran.c2se.identity.SigninRequest = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bet.beteran.c2se.identity.SigninRequest, jspb.Message); @@ -237,7 +342,8 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.bet.beteran.c2se.identity.SigninRequest.displayName = 'proto.bet.beteran.c2se.identity.SigninRequest'; + proto.bet.beteran.c2se.identity.SigninRequest.displayName = + "proto.bet.beteran.c2se.identity.SigninRequest"; } /** * Generated by JsPbCodeGenerator. @@ -249,7 +355,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.SigninResponse = function(opt_data) { +proto.bet.beteran.c2se.identity.SigninResponse = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.bet.beteran.c2se.identity.SigninResponse, jspb.Message); @@ -258,7 +364,8 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.bet.beteran.c2se.identity.SigninResponse.displayName = 'proto.bet.beteran.c2se.identity.SigninResponse'; + proto.bet.beteran.c2se.identity.SigninResponse.displayName = + "proto.bet.beteran.c2se.identity.SigninResponse"; } /** * Generated by JsPbCodeGenerator. @@ -270,71 +377,161 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.bet.beteran.c2se.identity.SigninResponse.Result = function(opt_data) { +proto.bet.beteran.c2se.identity.SigninResponse.Result = function (opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.bet.beteran.c2se.identity.SigninResponse.Result, jspb.Message); +goog.inherits( + proto.bet.beteran.c2se.identity.SigninResponse.Result, + jspb.Message +); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.bet.beteran.c2se.identity.SigninResponse.Result.displayName = 'proto.bet.beteran.c2se.identity.SigninResponse.Result'; + proto.bet.beteran.c2se.identity.SigninResponse.Result.displayName = + "proto.bet.beteran.c2se.identity.SigninResponse.Result"; +} +/** + * 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.identity.SigninWithoutSecurityCodeRequest = function ( + opt_data +) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.displayName = + "proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest"; +} +/** + * 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.identity.SigninWithoutSecurityCodeResponse = function ( + opt_data +) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits( + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.displayName = + "proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse"; +} +/** + * 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.identity.SigninWithoutSecurityCodeResponse.Result = + function (opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; +goog.inherits( + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result, + jspb.Message +); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result.displayName = + "proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result"; } - - 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.identity.CheckUsernameForDuplicationRequest.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.toObject(opt_includeInstance, this); -}; + /** + * 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.identity.CheckUsernameForDuplicationRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.toObject( + opt_includeInstance, + this + ); + }; + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.toObject = + function (includeInstance, msg) { + var f, + obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + }; -/** - * 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.identity.CheckUsernameForDuplicationRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.toObject = function(includeInstance, msg) { - var f, obj = { - username: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; } - /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest; - return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.deserializeBinaryFromReader(msg, reader); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest(); + return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; /** * Deserializes binary data (in protobuf wire format) from the @@ -343,36 +540,39 @@ proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.deserializeBi * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUsername(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -381,91 +581,102 @@ proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.prototype.ser * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUsername(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; /** * optional string username = 1; * @return {string} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.prototype.getUsername = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.prototype.getUsername = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; /** * @param {string} value * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest} returns this */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.prototype.setUsername = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.toObject = function(includeInstance, msg) { - var f, obj = { - error: (f = msg.getError()) && protobuf_rpc_pb.Error.toObject(includeInstance, f), - result: (f = msg.getResult()) && proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.toObject(includeInstance, f) +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationRequest.prototype.setUsername = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.CheckUsernameForDuplicationResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.toObject( + opt_includeInstance, + this + ); + }; + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.toObject = + function (includeInstance, msg) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_pb.Error.toObject(includeInstance, f), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.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.identity.CheckUsernameForDuplicationResponse} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse; - return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.deserializeBinaryFromReader(msg, reader); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse(); + return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; /** * Deserializes binary data (in protobuf wire format) from the @@ -474,42 +685,53 @@ proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.deserializeB * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.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_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = + new proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse + .Result.deserializeBinaryFromReader + ); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new protobuf_rpc_pb.Error; - reader.readMessage(value,protobuf_rpc_pb.Error.deserializeBinaryFromReader); - msg.setError(value); - break; - case 2: - var value = new proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result; - reader.readMessage(value,proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.deserializeBinaryFromReader); - msg.setResult(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -518,81 +740,83 @@ proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.se * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f != null) { - writer.writeMessage( - 1, - f, - protobuf_rpc_pb.Error.serializeBinaryToWriter - ); - } - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bet.beteran.c2se.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.identity.CheckUsernameForDuplicationResponse.Result.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.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.identity.CheckUsernameForDuplicationResponse.Result} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.toObject = function(includeInstance, msg) { - var f, obj = { - duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage(1, f, protobuf_rpc_pb.Error.serializeBinaryToWriter); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse + .Result.serializeBinaryToWriter + ); + } }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.CheckUsernameForDuplicationResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.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.identity.CheckUsernameForDuplicationResponse.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.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.identity.CheckUsernameForDuplicationResponse.Result} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result; - return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.deserializeBinaryFromReader(msg, reader); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result(); + return proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.deserializeBinaryFromReader( + msg, + reader + ); + }; /** * Deserializes binary data (in protobuf wire format) from the @@ -601,36 +825,39 @@ proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.deser * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.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; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDuplicated(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -639,164 +866,175 @@ proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.proto * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDuplicated(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - +proto.bet.beteran.c2se.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.identity.CheckUsernameForDuplicationResponse.Result.prototype.getDuplicated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.prototype.getDuplicated = + function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 1, false) + ); + }; /** * @param {boolean} value * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result} returns this */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result.prototype.setDuplicated = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - +proto.bet.beteran.c2se.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} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.getError = function() { - return /** @type{?proto.bet.protobuf.rpc.Error} */ ( - jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1)); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1) + ); + }; /** * @param {?proto.bet.protobuf.rpc.Error|undefined} value * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse} returns this -*/ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.setError = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - + */ +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; /** * Clears the message field making it undefined. * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse} returns this */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.clearError = function() { - return this.setError(undefined); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 1) != null; -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; /** * optional Result result = 2; * @return {?proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.getResult = function() { - return /** @type{?proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result} */ ( - jspb.Message.getWrapperField(this, proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result, 2)); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.getResult = + function () { + return /** @type{?proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse + .Result, + 2 + ) + ); + }; /** * @param {?proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse} returns this -*/ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - + */ +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.setResult = + function (value) { + return jspb.Message.setWrapperField(this, 2, value); + }; /** * Clears the message field making it undefined. * @return {!proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse} returns this */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.clearResult = function() { - return this.setResult(undefined); -}; - +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.clearResult = + function () { + return this.setResult(undefined); + }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.hasResult = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.toObject = function(includeInstance, msg) { - var f, obj = { - nickname: jspb.Message.getFieldWithDefault(msg, 1, "") +proto.bet.beteran.c2se.identity.CheckUsernameForDuplicationResponse.prototype.hasResult = + function () { + return jspb.Message.getField(this, 2) != null; }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.CheckNicknameForDuplicationRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.toObject( + opt_includeInstance, + this + ); + }; + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.toObject = + function (includeInstance, msg) { + var f, + obj = { + nickname: jspb.Message.getFieldWithDefault(msg, 1, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest; - return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.deserializeBinaryFromReader(msg, reader); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest(); + return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; /** * Deserializes binary data (in protobuf wire format) from the @@ -805,36 +1043,39 @@ proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.deserializeBi * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNickname(value); + break; + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNickname(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -843,91 +1084,102 @@ proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.prototype.ser * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getNickname(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getNickname(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; /** * optional string nickname = 1; * @return {string} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.prototype.getNickname = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.prototype.getNickname = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; /** * @param {string} value * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest} returns this */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.prototype.setNickname = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.toObject = function(includeInstance, msg) { - var f, obj = { - error: (f = msg.getError()) && protobuf_rpc_pb.Error.toObject(includeInstance, f), - result: (f = msg.getResult()) && proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.toObject(includeInstance, f) +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationRequest.prototype.setNickname = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.CheckNicknameForDuplicationResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.toObject( + opt_includeInstance, + this + ); + }; + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.toObject = + function (includeInstance, msg) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_pb.Error.toObject(includeInstance, f), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.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.identity.CheckNicknameForDuplicationResponse} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse; - return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.deserializeBinaryFromReader(msg, reader); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse(); + return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; /** * Deserializes binary data (in protobuf wire format) from the @@ -936,42 +1188,53 @@ proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.deserializeB * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.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_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = + new proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse + .Result.deserializeBinaryFromReader + ); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new protobuf_rpc_pb.Error; - reader.readMessage(value,protobuf_rpc_pb.Error.deserializeBinaryFromReader); - msg.setError(value); - break; - case 2: - var value = new proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result; - reader.readMessage(value,proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.deserializeBinaryFromReader); - msg.setResult(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -980,81 +1243,83 @@ proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.se * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f != null) { - writer.writeMessage( - 1, - f, - protobuf_rpc_pb.Error.serializeBinaryToWriter - ); - } - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bet.beteran.c2se.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.identity.CheckNicknameForDuplicationResponse.Result.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.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.identity.CheckNicknameForDuplicationResponse.Result} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.toObject = function(includeInstance, msg) { - var f, obj = { - duplicated: jspb.Message.getBooleanFieldWithDefault(msg, 1, false) +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage(1, f, protobuf_rpc_pb.Error.serializeBinaryToWriter); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse + .Result.serializeBinaryToWriter + ); + } }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.CheckNicknameForDuplicationResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.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.identity.CheckNicknameForDuplicationResponse.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.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.identity.CheckNicknameForDuplicationResponse.Result} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result; - return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.deserializeBinaryFromReader(msg, reader); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result(); + return proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.deserializeBinaryFromReader( + msg, + reader + ); + }; /** * Deserializes binary data (in protobuf wire format) from the @@ -1063,36 +1328,39 @@ proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.deser * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.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; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setDuplicated(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -1101,165 +1369,177 @@ proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.proto * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDuplicated(); - if (f) { - writer.writeBool( - 1, - f - ); - } -}; - +proto.bet.beteran.c2se.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.identity.CheckNicknameForDuplicationResponse.Result.prototype.getDuplicated = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.prototype.getDuplicated = + function () { + return /** @type {boolean} */ ( + jspb.Message.getBooleanFieldWithDefault(this, 1, false) + ); + }; /** * @param {boolean} value * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result} returns this */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result.prototype.setDuplicated = function(value) { - return jspb.Message.setProto3BooleanField(this, 1, value); -}; - +proto.bet.beteran.c2se.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} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.getError = function() { - return /** @type{?proto.bet.protobuf.rpc.Error} */ ( - jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1)); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1) + ); + }; /** * @param {?proto.bet.protobuf.rpc.Error|undefined} value * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse} returns this -*/ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.setError = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - + */ +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; /** * Clears the message field making it undefined. * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse} returns this */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.clearError = function() { - return this.setError(undefined); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 1) != null; -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; /** * optional Result result = 2; * @return {?proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.getResult = function() { - return /** @type{?proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result} */ ( - jspb.Message.getWrapperField(this, proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result, 2)); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.getResult = + function () { + return /** @type{?proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse + .Result, + 2 + ) + ); + }; /** * @param {?proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse} returns this -*/ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.setResult = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - + */ +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.setResult = + function (value) { + return jspb.Message.setWrapperField(this, 2, value); + }; /** * Clears the message field making it undefined. * @return {!proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse} returns this */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.clearResult = function() { - return this.setResult(undefined); -}; - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.clearResult = + function () { + return this.setResult(undefined); + }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.hasResult = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.bet.beteran.c2se.identity.CaptchaRequest.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.identity.CaptchaRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bet.beteran.c2se.identity.CaptchaRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.CaptchaRequest.toObject = function(includeInstance, msg) { - var f, obj = { - +proto.bet.beteran.c2se.identity.CheckNicknameForDuplicationResponse.prototype.hasResult = + function () { + return jspb.Message.getField(this, 2) != null; }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.CaptchaRequest.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.c2se.identity.CaptchaRequest.toObject( + opt_includeInstance, + this + ); + }; + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.c2se.identity.CaptchaRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.CaptchaRequest.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = {}; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bet.beteran.c2se.identity.CaptchaRequest} */ -proto.bet.beteran.c2se.identity.CaptchaRequest.deserializeBinary = function(bytes) { +proto.bet.beteran.c2se.identity.CaptchaRequest.deserializeBinary = function ( + bytes +) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.CaptchaRequest; - return proto.bet.beteran.c2se.identity.CaptchaRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.bet.beteran.c2se.identity.CaptchaRequest(); + return proto.bet.beteran.c2se.identity.CaptchaRequest.deserializeBinaryFromReader( + msg, + reader + ); }; - /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1267,32 +1547,35 @@ proto.bet.beteran.c2se.identity.CaptchaRequest.deserializeBinary = function(byte * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.CaptchaRequest} */ -proto.bet.beteran.c2se.identity.CaptchaRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.identity.CaptchaRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.CaptchaRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.CaptchaRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.CaptchaRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.CaptchaRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -1301,67 +1584,81 @@ proto.bet.beteran.c2se.identity.CaptchaRequest.prototype.serializeBinary = funct * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.CaptchaRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.identity.CaptchaResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bet.beteran.c2se.identity.CaptchaResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.CaptchaResponse.toObject = function(includeInstance, msg) { - var f, obj = { - error: (f = msg.getError()) && protobuf_rpc_pb.Error.toObject(includeInstance, f), - result: (f = msg.getResult()) && proto.bet.beteran.c2se.identity.CaptchaResponse.Result.toObject(includeInstance, f) +proto.bet.beteran.c2se.identity.CaptchaRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.CaptchaResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.identity.CaptchaResponse.toObject( + opt_includeInstance, + this + ); + }; + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.c2se.identity.CaptchaResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.CaptchaResponse.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_pb.Error.toObject(includeInstance, f), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.identity.CaptchaResponse.Result.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.identity.CaptchaResponse} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.deserializeBinary = function(bytes) { +proto.bet.beteran.c2se.identity.CaptchaResponse.deserializeBinary = function ( + bytes +) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.CaptchaResponse; - return proto.bet.beteran.c2se.identity.CaptchaResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.bet.beteran.c2se.identity.CaptchaResponse(); + return proto.bet.beteran.c2se.identity.CaptchaResponse.deserializeBinaryFromReader( + msg, + reader + ); }; - /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1369,42 +1666,53 @@ proto.bet.beteran.c2se.identity.CaptchaResponse.deserializeBinary = function(byt * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.CaptchaResponse} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.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_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = + new proto.bet.beteran.c2se.identity.CaptchaResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.identity.CaptchaResponse.Result + .deserializeBinaryFromReader + ); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new protobuf_rpc_pb.Error; - reader.readMessage(value,protobuf_rpc_pb.Error.deserializeBinaryFromReader); - msg.setError(value); - break; - case 2: - var value = new proto.bet.beteran.c2se.identity.CaptchaResponse.Result; - reader.readMessage(value,proto.bet.beteran.c2se.identity.CaptchaResponse.Result.deserializeBinaryFromReader); - msg.setResult(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.CaptchaResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.CaptchaResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -1413,82 +1721,85 @@ proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.serializeBinary = func * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.CaptchaResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f != null) { - writer.writeMessage( - 1, - f, - protobuf_rpc_pb.Error.serializeBinaryToWriter - ); - } - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bet.beteran.c2se.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.identity.CaptchaResponse.Result.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.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.identity.CaptchaResponse.Result} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result.toObject = function(includeInstance, msg) { - var f, obj = { - securityCodeHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - image: jspb.Message.getFieldWithDefault(msg, 2, "") +proto.bet.beteran.c2se.identity.CaptchaResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage(1, f, protobuf_rpc_pb.Error.serializeBinaryToWriter); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.identity.CaptchaResponse.Result + .serializeBinaryToWriter + ); + } }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.CaptchaResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.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.identity.CaptchaResponse.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.CaptchaResponse.Result.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + securityCodeHash: 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.identity.CaptchaResponse.Result} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.CaptchaResponse.Result; - return proto.bet.beteran.c2se.identity.CaptchaResponse.Result.deserializeBinaryFromReader(msg, reader); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.identity.CaptchaResponse.Result(); + return proto.bet.beteran.c2se.identity.CaptchaResponse.Result.deserializeBinaryFromReader( + msg, + reader + ); + }; /** * Deserializes binary data (in protobuf wire format) from the @@ -1497,40 +1808,43 @@ proto.bet.beteran.c2se.identity.CaptchaResponse.Result.deserializeBinary = funct * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.CaptchaResponse.Result} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.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.setSecurityCodeHash(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setImage(value); + break; + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSecurityCodeHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setImage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.CaptchaResponse.Result.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.CaptchaResponse.Result.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -1539,193 +1853,207 @@ proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.serializeBinary * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSecurityCodeHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getImage(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getSecurityCodeHash(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getImage(); + if (f.length > 0) { + writer.writeString(2, f); + } + }; /** * optional string security_code_hash = 1; * @return {string} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.getSecurityCodeHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.getSecurityCodeHash = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; /** * @param {string} value * @return {!proto.bet.beteran.c2se.identity.CaptchaResponse.Result} returns this */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.setSecurityCodeHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.setSecurityCodeHash = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; /** * optional string image = 2; * @return {string} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.getImage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.getImage = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; /** * @param {string} value * @return {!proto.bet.beteran.c2se.identity.CaptchaResponse.Result} returns this */ -proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.setImage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.Result.prototype.setImage = + function (value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; /** * optional bet.protobuf.rpc.Error error = 1; * @return {?proto.bet.protobuf.rpc.Error} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.getError = function() { - return /** @type{?proto.bet.protobuf.rpc.Error} */ ( - jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1)); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1) + ); + }; /** * @param {?proto.bet.protobuf.rpc.Error|undefined} value * @return {!proto.bet.beteran.c2se.identity.CaptchaResponse} returns this -*/ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.setError = function(value) { + */ +proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.setError = function ( + value +) { return jspb.Message.setWrapperField(this, 1, value); }; - /** * Clears the message field making it undefined. * @return {!proto.bet.beteran.c2se.identity.CaptchaResponse} returns this */ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.clearError = function() { - return this.setError(undefined); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 1) != null; -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; /** * optional Result result = 2; * @return {?proto.bet.beteran.c2se.identity.CaptchaResponse.Result} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.getResult = function() { - return /** @type{?proto.bet.beteran.c2se.identity.CaptchaResponse.Result} */ ( - jspb.Message.getWrapperField(this, proto.bet.beteran.c2se.identity.CaptchaResponse.Result, 2)); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.getResult = + function () { + return /** @type{?proto.bet.beteran.c2se.identity.CaptchaResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.identity.CaptchaResponse.Result, + 2 + ) + ); + }; /** * @param {?proto.bet.beteran.c2se.identity.CaptchaResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.identity.CaptchaResponse} returns this -*/ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.setResult = function(value) { + */ +proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.setResult = function ( + value +) { return jspb.Message.setWrapperField(this, 2, value); }; - /** * Clears the message field making it undefined. * @return {!proto.bet.beteran.c2se.identity.CaptchaResponse} returns this */ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.clearResult = function() { - return this.setResult(undefined); -}; - +proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.clearResult = + function () { + return this.setResult(undefined); + }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.hasResult = function() { - return jspb.Message.getField(this, 2) != null; -}; - - - - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.identity.SigninRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bet.beteran.c2se.identity.SigninRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.SigninRequest.toObject = function(includeInstance, msg) { - var f, obj = { - securityCodeHash: jspb.Message.getFieldWithDefault(msg, 1, ""), - securityCode: jspb.Message.getFieldWithDefault(msg, 2, ""), - username: jspb.Message.getFieldWithDefault(msg, 3, ""), - password: jspb.Message.getFieldWithDefault(msg, 4, "") +proto.bet.beteran.c2se.identity.CaptchaResponse.prototype.hasResult = + function () { + return jspb.Message.getField(this, 2) != null; }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.SigninRequest.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.c2se.identity.SigninRequest.toObject( + opt_includeInstance, + this + ); + }; + /** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.bet.beteran.c2se.identity.SigninRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.SigninRequest.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + securityCodeHash: jspb.Message.getFieldWithDefault(msg, 1, ""), + securityCode: jspb.Message.getFieldWithDefault(msg, 2, ""), + username: jspb.Message.getFieldWithDefault(msg, 3, ""), + password: jspb.Message.getFieldWithDefault(msg, 4, ""), + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; +} /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.bet.beteran.c2se.identity.SigninRequest} */ -proto.bet.beteran.c2se.identity.SigninRequest.deserializeBinary = function(bytes) { +proto.bet.beteran.c2se.identity.SigninRequest.deserializeBinary = function ( + bytes +) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.SigninRequest; - return proto.bet.beteran.c2se.identity.SigninRequest.deserializeBinaryFromReader(msg, reader); + var msg = new proto.bet.beteran.c2se.identity.SigninRequest(); + return proto.bet.beteran.c2se.identity.SigninRequest.deserializeBinaryFromReader( + msg, + reader + ); }; - /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1733,48 +2061,51 @@ proto.bet.beteran.c2se.identity.SigninRequest.deserializeBinary = function(bytes * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.SigninRequest} */ -proto.bet.beteran.c2se.identity.SigninRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.identity.SigninRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSecurityCodeHash(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSecurityCode(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSecurityCodeHash(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setSecurityCode(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setUsername(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setPassword(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.SigninRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.SigninRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.SigninRequest.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -1783,167 +2114,180 @@ proto.bet.beteran.c2se.identity.SigninRequest.prototype.serializeBinary = functi * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.SigninRequest.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getSecurityCodeHash(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSecurityCode(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getUsername(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getPassword(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } -}; - +proto.bet.beteran.c2se.identity.SigninRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getSecurityCodeHash(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getSecurityCode(); + if (f.length > 0) { + writer.writeString(2, f); + } + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(3, f); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString(4, f); + } + }; /** * optional string security_code_hash = 1; * @return {string} */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.getSecurityCodeHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - +proto.bet.beteran.c2se.identity.SigninRequest.prototype.getSecurityCodeHash = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; /** * @param {string} value * @return {!proto.bet.beteran.c2se.identity.SigninRequest} returns this */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.setSecurityCodeHash = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - +proto.bet.beteran.c2se.identity.SigninRequest.prototype.setSecurityCodeHash = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; /** * optional string security_code = 2; * @return {string} */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.getSecurityCode = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - +proto.bet.beteran.c2se.identity.SigninRequest.prototype.getSecurityCode = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; /** * @param {string} value * @return {!proto.bet.beteran.c2se.identity.SigninRequest} returns this */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.setSecurityCode = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - +proto.bet.beteran.c2se.identity.SigninRequest.prototype.setSecurityCode = + function (value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; /** * optional string username = 3; * @return {string} */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.getUsername = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - +proto.bet.beteran.c2se.identity.SigninRequest.prototype.getUsername = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; /** * @param {string} value * @return {!proto.bet.beteran.c2se.identity.SigninRequest} returns this */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.setUsername = function(value) { +proto.bet.beteran.c2se.identity.SigninRequest.prototype.setUsername = function ( + value +) { return jspb.Message.setProto3StringField(this, 3, value); }; - /** * optional string password = 4; * @return {string} */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.getPassword = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - +proto.bet.beteran.c2se.identity.SigninRequest.prototype.getPassword = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; /** * @param {string} value * @return {!proto.bet.beteran.c2se.identity.SigninRequest} returns this */ -proto.bet.beteran.c2se.identity.SigninRequest.prototype.setPassword = function(value) { +proto.bet.beteran.c2se.identity.SigninRequest.prototype.setPassword = function ( + value +) { return jspb.Message.setProto3StringField(this, 4, value); }; - - - - if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.identity.SigninResponse.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.bet.beteran.c2se.identity.SigninResponse} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.SigninResponse.toObject = function(includeInstance, msg) { - var f, obj = { - error: (f = msg.getError()) && protobuf_rpc_pb.Error.toObject(includeInstance, f), - result: (f = msg.getResult()) && proto.bet.beteran.c2se.identity.SigninResponse.Result.toObject(includeInstance, f) + /** + * 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.identity.SigninResponse.prototype.toObject = function ( + opt_includeInstance + ) { + return proto.bet.beteran.c2se.identity.SigninResponse.toObject( + opt_includeInstance, + this + ); }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} + /** + * 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.identity.SigninResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.SigninResponse.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_pb.Error.toObject(includeInstance, f), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.identity.SigninResponse.Result.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.identity.SigninResponse} */ -proto.bet.beteran.c2se.identity.SigninResponse.deserializeBinary = function(bytes) { +proto.bet.beteran.c2se.identity.SigninResponse.deserializeBinary = function ( + bytes +) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.SigninResponse; - return proto.bet.beteran.c2se.identity.SigninResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.bet.beteran.c2se.identity.SigninResponse(); + return proto.bet.beteran.c2se.identity.SigninResponse.deserializeBinaryFromReader( + msg, + reader + ); }; - /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1951,42 +2295,53 @@ proto.bet.beteran.c2se.identity.SigninResponse.deserializeBinary = function(byte * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.SigninResponse} */ -proto.bet.beteran.c2se.identity.SigninResponse.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.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_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = + new proto.bet.beteran.c2se.identity.SigninResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.identity.SigninResponse.Result + .deserializeBinaryFromReader + ); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new protobuf_rpc_pb.Error; - reader.readMessage(value,protobuf_rpc_pb.Error.deserializeBinaryFromReader); - msg.setError(value); - break; - case 2: - var value = new proto.bet.beteran.c2se.identity.SigninResponse.Result; - reader.readMessage(value,proto.bet.beteran.c2se.identity.SigninResponse.Result.deserializeBinaryFromReader); - msg.setResult(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.SigninResponse.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.SigninResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.SigninResponse.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -1995,81 +2350,84 @@ proto.bet.beteran.c2se.identity.SigninResponse.prototype.serializeBinary = funct * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.SigninResponse.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getError(); - if (f != null) { - writer.writeMessage( - 1, - f, - protobuf_rpc_pb.Error.serializeBinaryToWriter - ); - } - f = message.getResult(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.bet.beteran.c2se.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.identity.SigninResponse.Result.prototype.toObject = function(opt_includeInstance) { - return proto.bet.beteran.c2se.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.identity.SigninResponse.Result} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.bet.beteran.c2se.identity.SigninResponse.Result.toObject = function(includeInstance, msg) { - var f, obj = { - accessToken: jspb.Message.getFieldWithDefault(msg, 1, "") +proto.bet.beteran.c2se.identity.SigninResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage(1, f, protobuf_rpc_pb.Error.serializeBinaryToWriter); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.identity.SigninResponse.Result + .serializeBinaryToWriter + ); + } }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; -}; -} +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.identity.SigninResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.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.identity.SigninResponse.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.SigninResponse.Result.toObject = function ( + includeInstance, + msg + ) { + var f, + obj = { + accessToken: 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.identity.SigninResponse.Result} */ -proto.bet.beteran.c2se.identity.SigninResponse.Result.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.bet.beteran.c2se.identity.SigninResponse.Result; - return proto.bet.beteran.c2se.identity.SigninResponse.Result.deserializeBinaryFromReader(msg, reader); -}; - +proto.bet.beteran.c2se.identity.SigninResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.bet.beteran.c2se.identity.SigninResponse.Result(); + return proto.bet.beteran.c2se.identity.SigninResponse.Result.deserializeBinaryFromReader( + msg, + reader + ); + }; /** * Deserializes binary data (in protobuf wire format) from the @@ -2078,36 +2436,39 @@ proto.bet.beteran.c2se.identity.SigninResponse.Result.deserializeBinary = functi * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.bet.beteran.c2se.identity.SigninResponse.Result} */ -proto.bet.beteran.c2se.identity.SigninResponse.Result.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; +proto.bet.beteran.c2se.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.setAccessToken(value); + break; + default: + reader.skipField(); + break; + } } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAccessToken(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - + return msg; + }; /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.bet.beteran.c2se.identity.SigninResponse.Result.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.bet.beteran.c2se.identity.SigninResponse.Result.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; - +proto.bet.beteran.c2se.identity.SigninResponse.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.SigninResponse.Result.serializeBinaryToWriter( + this, + writer + ); + return writer.getResultBuffer(); + }; /** * Serializes the given message to binary data (in protobuf wire @@ -2116,108 +2477,647 @@ proto.bet.beteran.c2se.identity.SigninResponse.Result.prototype.serializeBinary * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.bet.beteran.c2se.identity.SigninResponse.Result.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getAccessToken(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - +proto.bet.beteran.c2se.identity.SigninResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getAccessToken(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; /** * optional string access_token = 1; * @return {string} */ -proto.bet.beteran.c2se.identity.SigninResponse.Result.prototype.getAccessToken = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - +proto.bet.beteran.c2se.identity.SigninResponse.Result.prototype.getAccessToken = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; /** * @param {string} value * @return {!proto.bet.beteran.c2se.identity.SigninResponse.Result} returns this */ -proto.bet.beteran.c2se.identity.SigninResponse.Result.prototype.setAccessToken = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - +proto.bet.beteran.c2se.identity.SigninResponse.Result.prototype.setAccessToken = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; /** * optional bet.protobuf.rpc.Error error = 1; * @return {?proto.bet.protobuf.rpc.Error} */ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.getError = function() { - return /** @type{?proto.bet.protobuf.rpc.Error} */ ( - jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1)); -}; - +proto.bet.beteran.c2se.identity.SigninResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1) + ); + }; /** * @param {?proto.bet.protobuf.rpc.Error|undefined} value * @return {!proto.bet.beteran.c2se.identity.SigninResponse} returns this -*/ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.setError = function(value) { + */ +proto.bet.beteran.c2se.identity.SigninResponse.prototype.setError = function ( + value +) { return jspb.Message.setWrapperField(this, 1, value); }; - /** * Clears the message field making it undefined. * @return {!proto.bet.beteran.c2se.identity.SigninResponse} returns this */ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.clearError = function() { - return this.setError(undefined); -}; - +proto.bet.beteran.c2se.identity.SigninResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.hasError = function() { - return jspb.Message.getField(this, 1) != null; -}; - +proto.bet.beteran.c2se.identity.SigninResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; /** * optional Result result = 2; * @return {?proto.bet.beteran.c2se.identity.SigninResponse.Result} */ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.getResult = function() { - return /** @type{?proto.bet.beteran.c2se.identity.SigninResponse.Result} */ ( - jspb.Message.getWrapperField(this, proto.bet.beteran.c2se.identity.SigninResponse.Result, 2)); -}; - +proto.bet.beteran.c2se.identity.SigninResponse.prototype.getResult = + function () { + return /** @type{?proto.bet.beteran.c2se.identity.SigninResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.identity.SigninResponse.Result, + 2 + ) + ); + }; /** * @param {?proto.bet.beteran.c2se.identity.SigninResponse.Result|undefined} value * @return {!proto.bet.beteran.c2se.identity.SigninResponse} returns this -*/ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.setResult = function(value) { + */ +proto.bet.beteran.c2se.identity.SigninResponse.prototype.setResult = function ( + value +) { return jspb.Message.setWrapperField(this, 2, value); }; - /** * Clears the message field making it undefined. * @return {!proto.bet.beteran.c2se.identity.SigninResponse} returns this */ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.clearResult = function() { - return this.setResult(undefined); -}; - +proto.bet.beteran.c2se.identity.SigninResponse.prototype.clearResult = + function () { + return this.setResult(undefined); + }; /** * Returns whether this field is set. * @return {boolean} */ -proto.bet.beteran.c2se.identity.SigninResponse.prototype.hasResult = function() { - return jspb.Message.getField(this, 2) != null; -}; +proto.bet.beteran.c2se.identity.SigninResponse.prototype.hasResult = + function () { + return jspb.Message.getField(this, 2) != null; + }; +if (jspb.Message.GENERATE_TO_OBJECT) { + /** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.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.identity.SigninWithoutSecurityCodeRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.toObject = + function (includeInstance, msg) { + var f, + obj = { + username: jspb.Message.getFieldWithDefault(msg, 1, ""), + password: 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.identity.SigninWithoutSecurityCodeRequest} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest(); + return proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUsername(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setPassword(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.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.identity.SigninWithoutSecurityCodeRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getUsername(); + if (f.length > 0) { + writer.writeString(1, f); + } + f = message.getPassword(); + if (f.length > 0) { + writer.writeString(2, f); + } + }; + +/** + * optional string username = 1; + * @return {string} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.prototype.getUsername = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest} returns this + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.prototype.setUsername = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + +/** + * optional string password = 2; + * @return {string} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.prototype.getPassword = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest} returns this + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeRequest.prototype.setPassword = + 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.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.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.identity.SigninWithoutSecurityCodeResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.toObject = + function (includeInstance, msg) { + var f, + obj = { + error: + (f = msg.getError()) && + protobuf_rpc_pb.Error.toObject(includeInstance, f), + result: + (f = msg.getResult()) && + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result.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.identity.SigninWithoutSecurityCodeResponse} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse(); + return proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.deserializeBinaryFromReader( + msg, + reader + ); + }; + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.deserializeBinaryFromReader = + function (msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new protobuf_rpc_pb.Error(); + reader.readMessage( + value, + protobuf_rpc_pb.Error.deserializeBinaryFromReader + ); + msg.setError(value); + break; + case 2: + var value = + new proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result(); + reader.readMessage( + value, + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse + .Result.deserializeBinaryFromReader + ); + msg.setResult(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.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.identity.SigninWithoutSecurityCodeResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getError(); + if (f != null) { + writer.writeMessage(1, f, protobuf_rpc_pb.Error.serializeBinaryToWriter); + } + f = message.getResult(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.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.identity.SigninWithoutSecurityCodeResponse.Result.prototype.toObject = + function (opt_includeInstance) { + return proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.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.identity.SigninWithoutSecurityCodeResponse.Result} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result.toObject = + function (includeInstance, msg) { + var f, + obj = { + accessToken: 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.identity.SigninWithoutSecurityCodeResponse.Result} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result.deserializeBinary = + function (bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = + new proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result(); + return proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.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.identity.SigninWithoutSecurityCodeResponse.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.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.setAccessToken(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result.prototype.serializeBinary = + function () { + var writer = new jspb.BinaryWriter(); + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.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.identity.SigninWithoutSecurityCodeResponse.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result.serializeBinaryToWriter = + function (message, writer) { + var f = undefined; + f = message.getAccessToken(); + if (f.length > 0) { + writer.writeString(1, f); + } + }; + +/** + * optional string access_token = 1; + * @return {string} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result.prototype.getAccessToken = + function () { + return /** @type {string} */ ( + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + +/** + * @param {string} value + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result} returns this + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result.prototype.setAccessToken = + function (value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + +/** + * optional bet.protobuf.rpc.Error error = 1; + * @return {?proto.bet.protobuf.rpc.Error} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.getError = + function () { + return /** @type{?proto.bet.protobuf.rpc.Error} */ ( + jspb.Message.getWrapperField(this, protobuf_rpc_pb.Error, 1) + ); + }; + +/** + * @param {?proto.bet.protobuf.rpc.Error|undefined} value + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse} returns this + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.setError = + function (value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse} returns this + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.clearError = + function () { + return this.setError(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.hasError = + function () { + return jspb.Message.getField(this, 1) != null; + }; + +/** + * optional Result result = 2; + * @return {?proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.getResult = + function () { + return /** @type{?proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result} */ ( + jspb.Message.getWrapperField( + this, + proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse + .Result, + 2 + ) + ); + }; + +/** + * @param {?proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.Result|undefined} value + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse} returns this + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.setResult = + function (value) { + return jspb.Message.setWrapperField(this, 2, value); + }; + +/** + * Clears the message field making it undefined. + * @return {!proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse} returns this + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.clearResult = + function () { + return this.setResult(undefined); + }; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.bet.beteran.c2se.identity.SigninWithoutSecurityCodeResponse.prototype.hasResult = + function () { + return jspb.Message.getField(this, 2) != null; + }; goog.object.extend(exports, proto.bet.beteran.c2se.identity); diff --git a/src/app/modules/user/main/compose/sign-in-compose.component.ts b/src/app/modules/user/main/compose/sign-in-compose.component.ts index d88aa24..f11bd61 100644 --- a/src/app/modules/user/main/compose/sign-in-compose.component.ts +++ b/src/app/modules/user/main/compose/sign-in-compose.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { MatDialogRef } from '@angular/material/dialog'; +import { AuthService } from 'app/core/auth/auth.service'; @Component({ selector: 'sign-in-compose', @@ -26,7 +27,8 @@ export class SignInComposeComponent implements OnInit { */ constructor( public matDialogRef: MatDialogRef, - private _formBuilder: FormBuilder + private _formBuilder: FormBuilder, + private _authService: AuthService ) {} // ----------------------------------------------------------------------------------------------------- @@ -87,5 +89,24 @@ export class SignInComposeComponent implements OnInit { /** * Send the message */ - send(): void {} + send(): void { + // Return if the form is invalid + if (this.composeForm?.invalid) { + return; + } + + // Disable the form + this.composeForm?.disable(); + + // Sign in + this._authService + .signIn(this.composeForm?.value) + .then(() => {}) + .catch((e) => { + // Re-enable the form + this.composeForm?.enable(); + + // Reset the form + }); + } }