import * as $protobuf from "protobufjs";
import Long = require("long");
/** Properties of a ReqUserLogin. */
export interface IReqUserLogin {

    /** ReqUserLogin username */
    username?: (string|null);

    /** ReqUserLogin password */
    password?: (string|null);

    /** ReqUserLogin ip */
    ip?: (string|null);

    /** ReqUserLogin deviceId */
    deviceId?: (string|null);

    /** ReqUserLogin version */
    version?: (string|null);
}

/** Represents a ReqUserLogin. */
export class ReqUserLogin implements IReqUserLogin {

    /**
     * Constructs a new ReqUserLogin.
     * @param [properties] Properties to set
     */
    constructor(properties?: IReqUserLogin);

    /** ReqUserLogin username. */
    public username: string;

    /** ReqUserLogin password. */
    public password: string;

    /** ReqUserLogin ip. */
    public ip: string;

    /** ReqUserLogin deviceId. */
    public deviceId: string;

    /** ReqUserLogin version. */
    public version: string;

    /**
     * Creates a new ReqUserLogin instance using the specified properties.
     * @param [properties] Properties to set
     * @returns ReqUserLogin instance
     */
    public static create(properties?: IReqUserLogin): ReqUserLogin;

    /**
     * Encodes the specified ReqUserLogin message. Does not implicitly {@link ReqUserLogin.verify|verify} messages.
     * @param message ReqUserLogin message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encode(message: IReqUserLogin, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Encodes the specified ReqUserLogin message, length delimited. Does not implicitly {@link ReqUserLogin.verify|verify} messages.
     * @param message ReqUserLogin message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encodeDelimited(message: IReqUserLogin, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Decodes a ReqUserLogin message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns ReqUserLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ReqUserLogin;

    /**
     * Decodes a ReqUserLogin message from the specified reader or buffer, length delimited.
     * @param reader Reader or buffer to decode from
     * @returns ReqUserLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ReqUserLogin;

    /**
     * Verifies a ReqUserLogin message.
     * @param message Plain object to verify
     * @returns `null` if valid, otherwise the reason why it is not
     */
    public static verify(message: { [k: string]: any }): (string|null);

    /**
     * Creates a ReqUserLogin message from a plain object. Also converts values to their respective internal types.
     * @param object Plain object
     * @returns ReqUserLogin
     */
    public static fromObject(object: { [k: string]: any }): ReqUserLogin;

    /**
     * Creates a plain object from a ReqUserLogin message. Also converts values to other types if specified.
     * @param message ReqUserLogin
     * @param [options] Conversion options
     * @returns Plain object
     */
    public static toObject(message: ReqUserLogin, options?: $protobuf.IConversionOptions): { [k: string]: any };

    /**
     * Converts this ReqUserLogin to JSON.
     * @returns JSON object
     */
    public toJSON(): { [k: string]: any };

    /**
     * Gets the default type url for ReqUserLogin
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a RspUserLogin. */
export interface IRspUserLogin {

    /** RspUserLogin code */
    code?: (ErrCode|null);

    /** RspUserLogin userId */
    userId?: (Long|null);

    /** RspUserLogin token */
    token?: (string|null);
}

/** Represents a RspUserLogin. */
export class RspUserLogin implements IRspUserLogin {

    /**
     * Constructs a new RspUserLogin.
     * @param [properties] Properties to set
     */
    constructor(properties?: IRspUserLogin);

    /** RspUserLogin code. */
    public code: ErrCode;

    /** RspUserLogin userId. */
    public userId: Long;

    /** RspUserLogin token. */
    public token: string;

    /**
     * Creates a new RspUserLogin instance using the specified properties.
     * @param [properties] Properties to set
     * @returns RspUserLogin instance
     */
    public static create(properties?: IRspUserLogin): RspUserLogin;

    /**
     * Encodes the specified RspUserLogin message. Does not implicitly {@link RspUserLogin.verify|verify} messages.
     * @param message RspUserLogin message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encode(message: IRspUserLogin, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Encodes the specified RspUserLogin message, length delimited. Does not implicitly {@link RspUserLogin.verify|verify} messages.
     * @param message RspUserLogin message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encodeDelimited(message: IRspUserLogin, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Decodes a RspUserLogin message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns RspUserLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): RspUserLogin;

    /**
     * Decodes a RspUserLogin message from the specified reader or buffer, length delimited.
     * @param reader Reader or buffer to decode from
     * @returns RspUserLogin
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): RspUserLogin;

    /**
     * Verifies a RspUserLogin message.
     * @param message Plain object to verify
     * @returns `null` if valid, otherwise the reason why it is not
     */
    public static verify(message: { [k: string]: any }): (string|null);

    /**
     * Creates a RspUserLogin message from a plain object. Also converts values to their respective internal types.
     * @param object Plain object
     * @returns RspUserLogin
     */
    public static fromObject(object: { [k: string]: any }): RspUserLogin;

    /**
     * Creates a plain object from a RspUserLogin message. Also converts values to other types if specified.
     * @param message RspUserLogin
     * @param [options] Conversion options
     * @returns Plain object
     */
    public static toObject(message: RspUserLogin, options?: $protobuf.IConversionOptions): { [k: string]: any };

    /**
     * Converts this RspUserLogin to JSON.
     * @returns JSON object
     */
    public toJSON(): { [k: string]: any };

    /**
     * Gets the default type url for RspUserLogin
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a NtfUserOnline. */
export interface INtfUserOnline {

    /** NtfUserOnline userId */
    userId?: (Long|null);
}

/** Represents a NtfUserOnline. */
export class NtfUserOnline implements INtfUserOnline {

    /**
     * Constructs a new NtfUserOnline.
     * @param [properties] Properties to set
     */
    constructor(properties?: INtfUserOnline);

    /** NtfUserOnline userId. */
    public userId: Long;

    /**
     * Creates a new NtfUserOnline instance using the specified properties.
     * @param [properties] Properties to set
     * @returns NtfUserOnline instance
     */
    public static create(properties?: INtfUserOnline): NtfUserOnline;

    /**
     * Encodes the specified NtfUserOnline message. Does not implicitly {@link NtfUserOnline.verify|verify} messages.
     * @param message NtfUserOnline message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encode(message: INtfUserOnline, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Encodes the specified NtfUserOnline message, length delimited. Does not implicitly {@link NtfUserOnline.verify|verify} messages.
     * @param message NtfUserOnline message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encodeDelimited(message: INtfUserOnline, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Decodes a NtfUserOnline message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns NtfUserOnline
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): NtfUserOnline;

    /**
     * Decodes a NtfUserOnline message from the specified reader or buffer, length delimited.
     * @param reader Reader or buffer to decode from
     * @returns NtfUserOnline
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): NtfUserOnline;

    /**
     * Verifies a NtfUserOnline message.
     * @param message Plain object to verify
     * @returns `null` if valid, otherwise the reason why it is not
     */
    public static verify(message: { [k: string]: any }): (string|null);

    /**
     * Creates a NtfUserOnline message from a plain object. Also converts values to their respective internal types.
     * @param object Plain object
     * @returns NtfUserOnline
     */
    public static fromObject(object: { [k: string]: any }): NtfUserOnline;

    /**
     * Creates a plain object from a NtfUserOnline message. Also converts values to other types if specified.
     * @param message NtfUserOnline
     * @param [options] Conversion options
     * @returns Plain object
     */
    public static toObject(message: NtfUserOnline, options?: $protobuf.IConversionOptions): { [k: string]: any };

    /**
     * Converts this NtfUserOnline to JSON.
     * @returns JSON object
     */
    public toJSON(): { [k: string]: any };

    /**
     * Gets the default type url for NtfUserOnline
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a NtfUserInService. */
export interface INtfUserInService {

    /** NtfUserInService serviceNames */
    serviceNames?: (string[]|null);
}

/** Represents a NtfUserInService. */
export class NtfUserInService implements INtfUserInService {

    /**
     * Constructs a new NtfUserInService.
     * @param [properties] Properties to set
     */
    constructor(properties?: INtfUserInService);

    /** NtfUserInService serviceNames. */
    public serviceNames: string[];

    /**
     * Creates a new NtfUserInService instance using the specified properties.
     * @param [properties] Properties to set
     * @returns NtfUserInService instance
     */
    public static create(properties?: INtfUserInService): NtfUserInService;

    /**
     * Encodes the specified NtfUserInService message. Does not implicitly {@link NtfUserInService.verify|verify} messages.
     * @param message NtfUserInService message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encode(message: INtfUserInService, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Encodes the specified NtfUserInService message, length delimited. Does not implicitly {@link NtfUserInService.verify|verify} messages.
     * @param message NtfUserInService message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encodeDelimited(message: INtfUserInService, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Decodes a NtfUserInService message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns NtfUserInService
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): NtfUserInService;

    /**
     * Decodes a NtfUserInService message from the specified reader or buffer, length delimited.
     * @param reader Reader or buffer to decode from
     * @returns NtfUserInService
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): NtfUserInService;

    /**
     * Verifies a NtfUserInService message.
     * @param message Plain object to verify
     * @returns `null` if valid, otherwise the reason why it is not
     */
    public static verify(message: { [k: string]: any }): (string|null);

    /**
     * Creates a NtfUserInService message from a plain object. Also converts values to their respective internal types.
     * @param object Plain object
     * @returns NtfUserInService
     */
    public static fromObject(object: { [k: string]: any }): NtfUserInService;

    /**
     * Creates a plain object from a NtfUserInService message. Also converts values to other types if specified.
     * @param message NtfUserInService
     * @param [options] Conversion options
     * @returns Plain object
     */
    public static toObject(message: NtfUserInService, options?: $protobuf.IConversionOptions): { [k: string]: any };

    /**
     * Converts this NtfUserInService to JSON.
     * @returns JSON object
     */
    public toJSON(): { [k: string]: any };

    /**
     * Gets the default type url for NtfUserInService
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a ReqUserLogout. */
export interface IReqUserLogout {
}

/** Represents a ReqUserLogout. */
export class ReqUserLogout implements IReqUserLogout {

    /**
     * Constructs a new ReqUserLogout.
     * @param [properties] Properties to set
     */
    constructor(properties?: IReqUserLogout);

    /**
     * Creates a new ReqUserLogout instance using the specified properties.
     * @param [properties] Properties to set
     * @returns ReqUserLogout instance
     */
    public static create(properties?: IReqUserLogout): ReqUserLogout;

    /**
     * Encodes the specified ReqUserLogout message. Does not implicitly {@link ReqUserLogout.verify|verify} messages.
     * @param message ReqUserLogout message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encode(message: IReqUserLogout, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Encodes the specified ReqUserLogout message, length delimited. Does not implicitly {@link ReqUserLogout.verify|verify} messages.
     * @param message ReqUserLogout message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encodeDelimited(message: IReqUserLogout, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Decodes a ReqUserLogout message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns ReqUserLogout
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): ReqUserLogout;

    /**
     * Decodes a ReqUserLogout message from the specified reader or buffer, length delimited.
     * @param reader Reader or buffer to decode from
     * @returns ReqUserLogout
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): ReqUserLogout;

    /**
     * Verifies a ReqUserLogout message.
     * @param message Plain object to verify
     * @returns `null` if valid, otherwise the reason why it is not
     */
    public static verify(message: { [k: string]: any }): (string|null);

    /**
     * Creates a ReqUserLogout message from a plain object. Also converts values to their respective internal types.
     * @param object Plain object
     * @returns ReqUserLogout
     */
    public static fromObject(object: { [k: string]: any }): ReqUserLogout;

    /**
     * Creates a plain object from a ReqUserLogout message. Also converts values to other types if specified.
     * @param message ReqUserLogout
     * @param [options] Conversion options
     * @returns Plain object
     */
    public static toObject(message: ReqUserLogout, options?: $protobuf.IConversionOptions): { [k: string]: any };

    /**
     * Converts this ReqUserLogout to JSON.
     * @returns JSON object
     */
    public toJSON(): { [k: string]: any };

    /**
     * Gets the default type url for ReqUserLogout
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a RspUserLogout. */
export interface IRspUserLogout {

    /** RspUserLogout code */
    code?: (ErrCode|null);
}

/** Represents a RspUserLogout. */
export class RspUserLogout implements IRspUserLogout {

    /**
     * Constructs a new RspUserLogout.
     * @param [properties] Properties to set
     */
    constructor(properties?: IRspUserLogout);

    /** RspUserLogout code. */
    public code: ErrCode;

    /**
     * Creates a new RspUserLogout instance using the specified properties.
     * @param [properties] Properties to set
     * @returns RspUserLogout instance
     */
    public static create(properties?: IRspUserLogout): RspUserLogout;

    /**
     * Encodes the specified RspUserLogout message. Does not implicitly {@link RspUserLogout.verify|verify} messages.
     * @param message RspUserLogout message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encode(message: IRspUserLogout, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Encodes the specified RspUserLogout message, length delimited. Does not implicitly {@link RspUserLogout.verify|verify} messages.
     * @param message RspUserLogout message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encodeDelimited(message: IRspUserLogout, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Decodes a RspUserLogout message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns RspUserLogout
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): RspUserLogout;

    /**
     * Decodes a RspUserLogout message from the specified reader or buffer, length delimited.
     * @param reader Reader or buffer to decode from
     * @returns RspUserLogout
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): RspUserLogout;

    /**
     * Verifies a RspUserLogout message.
     * @param message Plain object to verify
     * @returns `null` if valid, otherwise the reason why it is not
     */
    public static verify(message: { [k: string]: any }): (string|null);

    /**
     * Creates a RspUserLogout message from a plain object. Also converts values to their respective internal types.
     * @param object Plain object
     * @returns RspUserLogout
     */
    public static fromObject(object: { [k: string]: any }): RspUserLogout;

    /**
     * Creates a plain object from a RspUserLogout message. Also converts values to other types if specified.
     * @param message RspUserLogout
     * @param [options] Conversion options
     * @returns Plain object
     */
    public static toObject(message: RspUserLogout, options?: $protobuf.IConversionOptions): { [k: string]: any };

    /**
     * Converts this RspUserLogout to JSON.
     * @returns JSON object
     */
    public toJSON(): { [k: string]: any };

    /**
     * Gets the default type url for RspUserLogout
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** Properties of a NtfUserOffline. */
export interface INtfUserOffline {

    /** NtfUserOffline userId */
    userId?: (Long|null);
}

/** Represents a NtfUserOffline. */
export class NtfUserOffline implements INtfUserOffline {

    /**
     * Constructs a new NtfUserOffline.
     * @param [properties] Properties to set
     */
    constructor(properties?: INtfUserOffline);

    /** NtfUserOffline userId. */
    public userId: Long;

    /**
     * Creates a new NtfUserOffline instance using the specified properties.
     * @param [properties] Properties to set
     * @returns NtfUserOffline instance
     */
    public static create(properties?: INtfUserOffline): NtfUserOffline;

    /**
     * Encodes the specified NtfUserOffline message. Does not implicitly {@link NtfUserOffline.verify|verify} messages.
     * @param message NtfUserOffline message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encode(message: INtfUserOffline, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Encodes the specified NtfUserOffline message, length delimited. Does not implicitly {@link NtfUserOffline.verify|verify} messages.
     * @param message NtfUserOffline message or plain object to encode
     * @param [writer] Writer to encode to
     * @returns Writer
     */
    public static encodeDelimited(message: INtfUserOffline, writer?: $protobuf.Writer): $protobuf.Writer;

    /**
     * Decodes a NtfUserOffline message from the specified reader or buffer.
     * @param reader Reader or buffer to decode from
     * @param [length] Message length if known beforehand
     * @returns NtfUserOffline
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): NtfUserOffline;

    /**
     * Decodes a NtfUserOffline message from the specified reader or buffer, length delimited.
     * @param reader Reader or buffer to decode from
     * @returns NtfUserOffline
     * @throws {Error} If the payload is not a reader or valid buffer
     * @throws {$protobuf.util.ProtocolError} If required fields are missing
     */
    public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): NtfUserOffline;

    /**
     * Verifies a NtfUserOffline message.
     * @param message Plain object to verify
     * @returns `null` if valid, otherwise the reason why it is not
     */
    public static verify(message: { [k: string]: any }): (string|null);

    /**
     * Creates a NtfUserOffline message from a plain object. Also converts values to their respective internal types.
     * @param object Plain object
     * @returns NtfUserOffline
     */
    public static fromObject(object: { [k: string]: any }): NtfUserOffline;

    /**
     * Creates a plain object from a NtfUserOffline message. Also converts values to other types if specified.
     * @param message NtfUserOffline
     * @param [options] Conversion options
     * @returns Plain object
     */
    public static toObject(message: NtfUserOffline, options?: $protobuf.IConversionOptions): { [k: string]: any };

    /**
     * Converts this NtfUserOffline to JSON.
     * @returns JSON object
     */
    public toJSON(): { [k: string]: any };

    /**
     * Gets the default type url for NtfUserOffline
     * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
     * @returns The default type url
     */
    public static getTypeUrl(typeUrlPrefix?: string): string;
}

/** ErrCode enum. */
export enum ErrCode {
    OK = 0,
    SystemErr = 1,
    ParamErr = 2,
    LoginDiffLoc = 100,
    LoginUserOrPwdErr = 102,
    AccountFrozen = 103,
    AccountBanned = 104,
    RegisterUserExist = 110,
    VersionTooLow = 115,
    Maintain = 120,
    GoldNotEnough = 125,
    NotBetCount = 126,
    NotLeaveRoom = 127,
    TotalBetExceedsLimit = 500,
    AreaBetExceedsLimit = 505
}
